public virtual string ReadCurrentFunctionJavaName()
			{
				Exception t = new Exception();
				// remove prefix and suffix of method name
				return t.GetStackTrace()[8].GetMethodName().ReplaceFirst("_[^_]*_(.*)_[^_]*", "$1");
			}
Example #2
0
 /** Return first non ErrorManager code location for generating messages */
 private static StackFrame GetLastNonErrorManagerCodeLocation( Exception e )
 {
     StackFrame[] stack = e.GetStackTrace();
     int i = 0;
     for ( ; i < stack.Length; i++ )
     {
         StackFrame t = stack[i];
         if ( t.ToString().IndexOf( "ErrorManager" ) < 0 )
         {
             break;
         }
     }
     StackFrame location = stack[i];
     return location;
 }