2025-10-13 19:39:36 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Convention.RScript
|
|
|
|
|
{
|
2025-10-16 17:23:37 +08:00
|
|
|
|
|
2025-10-13 19:39:36 +08:00
|
|
|
|
[Serializable]
|
2025-10-16 17:23:37 +08:00
|
|
|
|
public class RScriptException : Exception
|
2025-10-13 19:39:36 +08:00
|
|
|
|
{
|
2025-10-16 17:23:37 +08:00
|
|
|
|
public RScriptException() { }
|
|
|
|
|
public RScriptException(string message) : base(message) { }
|
|
|
|
|
public RScriptException(string message, Exception inner) : base(message, inner) { }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class RScriptRuntimeException : RScriptException
|
|
|
|
|
{
|
2025-10-15 16:50:10 +08:00
|
|
|
|
public RScriptRuntimeException(string message, int runtimePointer) : base($"when running {runtimePointer}, {message}") { }
|
|
|
|
|
public RScriptRuntimeException(string message, int runtimePointer, Exception inner) : base($"when running {runtimePointer}, {message}", inner) { }
|
2025-10-13 19:39:36 +08:00
|
|
|
|
}
|
2025-10-15 16:50:10 +08:00
|
|
|
|
|
|
|
|
|
[Serializable]
|
2025-10-16 17:23:37 +08:00
|
|
|
|
public class RScriptCompileException : RScriptException
|
2025-10-15 16:50:10 +08:00
|
|
|
|
{
|
|
|
|
|
public RScriptCompileException(string message, int line, int chIndex) : base($"when compile on line {line} char {chIndex}, {message}") { }
|
|
|
|
|
public RScriptCompileException(string message, int line, int chIndex, Exception inner) : base($"when compile on line {line} char {chIndex}, {message}", inner) { }
|
|
|
|
|
}
|
2025-10-13 19:39:36 +08:00
|
|
|
|
}
|