internal int errorHandle(Exception exc) { Tag.TAG state = (exc is eTagJump) ? ((eTagJump)exc).state : Tag.TAG.RAISE; int ex = 0; switch (state & Tag.TAG.MASK) { case Tag.TAG.EMPTY: ex = 0; break; case Tag.TAG.RETURN: errorPos(); System.Console.Error.WriteLine(": unexpected return"); ex = 1; break; case Tag.TAG.NEXT: errorPos(); System.Console.Error.WriteLine(": unexpected next"); ex = 1; break; case Tag.TAG.BREAK: errorPos(); System.Console.Error.WriteLine(": unexpected break"); ex = 1; break; case Tag.TAG.REDO: errorPos(); System.Console.Error.WriteLine(": unexpected redo"); ex = 1; break; case Tag.TAG.RETRY: errorPos(); System.Console.Error.WriteLine(": retry outside of rescue clause"); ex = 1; break; case Tag.TAG.RAISE: case Tag.TAG.FATAL: ruby.errorPrint(this, exc); ex = 1; break; default: ruby.bug("Unknown longjmp status " + ex.ToString()); break; } return(ex); }
internal eTagJump(Tag.TAG t, Exception e, string s) : base(s, e) { state = t; }
internal eTagJump(Tag.TAG t) { state = t; }