LineNumber() public method

Returns the line number of the statement causing the error, or zero if not available.
Returns the line number of the statement causing the error, or zero if not available.
public LineNumber ( ) : int
return int
コード例 #1
0
ファイル: ToolErrorReporter.cs プロジェクト: hazzik/Rhino.Net
		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
ファイル: ToolErrorReporter.cs プロジェクト: hazzik/Rhino.Net
		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());
			}
		}