Renamed 'sunScriptException' to 'sunSourceException'.
This commit is contained in:
parent
dfde9c2b20
commit
6edee006ad
3 changed files with 8 additions and 8 deletions
|
@ -35,9 +35,9 @@ namespace arookas
|
|||
}
|
||||
else
|
||||
{
|
||||
if (results.Error is sunScriptException)
|
||||
if (results.Error is sunSourceException)
|
||||
{
|
||||
var error = results.Error as sunScriptException;
|
||||
var error = results.Error as sunSourceException;
|
||||
Error(" in file \"{0}\"\n at line {1}, col {2}\n\n{3}{4}", error.Location.File, error.Location.Line, error.Location.Column, GetErrorPreview(error.Location), error.Message);
|
||||
exitCode = 1;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ Use the various properties on this type to gather the information of the compila
|
|||
|`FunctionCount`|The total number of function symbols created.|
|
||||
|`VariableCount`|The total number of global-scope variable symbols created.|
|
||||
|
||||
If the error is of the type `sunScriptException`, you can cast and retrieve the script name, line, and column of the error.
|
||||
If the error is of the type `sunSourceException`, you can cast and retrieve the script name, line, and column of the error.
|
||||
|
||||
## Compiling
|
||||
|
||||
|
|
|
@ -18,15 +18,15 @@ namespace arookas
|
|||
}
|
||||
|
||||
// exceptions that have a location in the source
|
||||
public abstract class sunScriptException : sunCompilerException
|
||||
public abstract class sunSourceException : sunCompilerException
|
||||
{
|
||||
public abstract sunSourceLocation Location { get; }
|
||||
|
||||
public sunScriptException()
|
||||
public sunSourceException()
|
||||
{
|
||||
|
||||
}
|
||||
public sunScriptException(string format, params object[] args)
|
||||
public sunSourceException(string format, params object[] args)
|
||||
: base(format, args)
|
||||
{
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace arookas
|
|||
}
|
||||
|
||||
// wrapper around Grammatica exceptions
|
||||
class sunParserException : sunScriptException
|
||||
class sunParserException : sunSourceException
|
||||
{
|
||||
string file;
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace arookas
|
|||
}
|
||||
|
||||
// node exceptions
|
||||
abstract class sunNodeException<TNode> : sunScriptException where TNode : sunNode
|
||||
abstract class sunNodeException<TNode> : sunSourceException where TNode : sunNode
|
||||
{
|
||||
public TNode Node { get; private set; }
|
||||
public override sunSourceLocation Location { get { return Node.Location; } }
|
||||
|
|
Loading…
Reference in a new issue