Daily update on 20250430-073804 by Nitload Youmu. Additional Message : full function of syntax analyze to STEP file
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -42,8 +42,23 @@ namespace StgSharp.Script.Express
|
||||
public class ExpException : Exception
|
||||
{
|
||||
|
||||
private Token _pos;
|
||||
|
||||
public ExpException( string message ) : base( message ) { }
|
||||
|
||||
public ExpException( Token position, string message )
|
||||
: base( $"Express compile error at {position.Line}-{position.Column}:\n{message}" )
|
||||
{
|
||||
_pos = position;
|
||||
}
|
||||
|
||||
public ExpException( ExpSyntaxNode node, string message )
|
||||
: base(
|
||||
$"Express compile error at {node.Source.Line}-{node.Source.Column}:\n{message}" )
|
||||
{
|
||||
_pos = node._source;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ExpInvalidCharException : ExpException
|
||||
@@ -100,11 +115,17 @@ namespace StgSharp.Script.Express
|
||||
|
||||
}
|
||||
|
||||
public class ExpInvalidTypeException : InvalidCastException
|
||||
public class ExpInvalidTypeException : ExpException
|
||||
{
|
||||
|
||||
public ExpInvalidTypeException( string required, string provided )
|
||||
public ExpInvalidTypeException( ExpSyntaxNode node, string required, string provided )
|
||||
: base(
|
||||
node,
|
||||
$"Type {required} is required at position, but a {provided} instance is provided." ) { }
|
||||
|
||||
public ExpInvalidTypeException( Token t, string required, string provided )
|
||||
: base(
|
||||
t,
|
||||
$"Type {required} is required at position, but a {provided} instance is provided." ) { }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user