Added: new import resolver system which allows for custom user import resolving.
This commit is contained in:
parent
08864e5e1f
commit
e08b2dc888
7 changed files with 213 additions and 129 deletions
|
@ -33,6 +33,27 @@ namespace arookas
|
|||
}
|
||||
}
|
||||
|
||||
public class sunImportException : sunCompilerException
|
||||
{
|
||||
public string Name { get; private set; }
|
||||
public sunImportResult Result { get; private set; }
|
||||
public override string Message { get { return String.Format("Name: {0}, Result: {1}", Name, Result); } }
|
||||
|
||||
public sunImportException(string name, sunImportResult result)
|
||||
{
|
||||
if (name == null)
|
||||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
if (!result.IsDefined())
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("name");
|
||||
}
|
||||
Name = name;
|
||||
Result = result;
|
||||
}
|
||||
}
|
||||
|
||||
// wrapper around Grammatica exceptions
|
||||
class sunParserException : sunScriptException
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue