port from perforce
This commit is contained in:
15
intromat/Intromat/Model/Compiler/Error/CompilerException.cs
Normal file
15
intromat/Intromat/Model/Compiler/Error/CompilerException.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Intromat.Model.Compiler.Error
|
||||
{
|
||||
public class CompilerException : Exception
|
||||
{
|
||||
public CompilerException(string msg) : base(msg)
|
||||
{
|
||||
}
|
||||
|
||||
public CompilerException(string msg, Exception inner) : base(msg, inner)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Intromat.Model.Compiler.Error
|
||||
{
|
||||
public class VariableOutOfScopeException : CompilerException
|
||||
{
|
||||
public VariableOutOfScopeException(string variableName)
|
||||
: base($"The variable '{variableName}' was referenced outside its scope.")
|
||||
{
|
||||
VariableName = variableName;
|
||||
}
|
||||
|
||||
public string VariableName { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user