SourceName() public method

Get the uri of the script source containing the error, or null if that information is not available.
Get the uri of the script source containing the error, or null if that information is not available.
public SourceName ( ) : string
return string
示例#1
0
		public virtual void ReportException(RhinoException ex)
		{
			if (ex is WrappedException)
			{
				WrappedException we = (WrappedException)ex;
				Sharpen.Runtime.PrintStackTrace(we, err);
			}
			else
			{
				string lineSeparator = SecurityUtilities.GetSystemProperty("line.separator");
				string msg = GetExceptionMessage(ex) + lineSeparator + ex.GetScriptStackTrace();
				ReportErrorMessage(msg, ex.SourceName(), ex.LineNumber(), ex.LineSource(), ex.ColumnNumber(), false);
			}
		}
示例#2
0
		public static void ReportException(ErrorReporter er, RhinoException ex)
		{
			if (er is Rhino.Tools.ToolErrorReporter)
			{
				((Rhino.Tools.ToolErrorReporter)er).ReportException(ex);
			}
			else
			{
				string msg = GetExceptionMessage(ex);
				er.Error(msg, ex.SourceName(), ex.LineNumber(), ex.LineSource(), ex.ColumnNumber());
			}
		}