public ExceptionRaiser() { RaiseExceptionDelegate red = RaiseException; //GCHandle _gcHandle = GCHandle.Alloc(red); SprExport.Spr_register_exception_raiser(red); }
public static String what(System.Exception e) { IntPtr ptr = SprExport.Spr_SEH_Exception_what(); String s1 = Marshal.PtrToStringBSTR(ptr); String s2 = e.ToString(); return(s1.Substring(0, s1.Length - 1) + "\n" + s2); }
public static void init() { if (!st) { SprExport.Spr_set_se_translator(); st = true; } er = er ?? new ExceptionRaiser(); }
public static String what() { IntPtr ptr = SprExport.Spr_SEH_Exception_what(); return(Marshal.PtrToStringBSTR(ptr)); }