private static CreateErrorFromType ( string errorType ) : |
||
errorType | string | |
return |
private static BikeObject CreateErrorFromType(string errorType, params object[] args)
{
var stackTrace = BuildStackTrace();
var prototype = ResolvePrototype(errorType);
var ctor = (BikeFunction)prototype.Resolve("create");
var error = (BikeObject)InterpretationContext.Instance.Interpreter.CallBikeFunction(ctor, prototype, args);
error.Assign("stack_trace", stackTrace);
return error;
}