Exemplo n.º 1
0
    public ExceptionRaiser()
    {
        RaiseExceptionDelegate red = RaiseException;

        //GCHandle _gcHandle = GCHandle.Alloc(red);
        SprExport.Spr_register_exception_raiser(red);
    }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
 public static void init()
 {
     if (!st)
     {
         SprExport.Spr_set_se_translator(); st = true;
     }
     er = er ?? new ExceptionRaiser();
 }
Exemplo n.º 4
0
    public static String what()
    {
        IntPtr ptr = SprExport.Spr_SEH_Exception_what();

        return(Marshal.PtrToStringBSTR(ptr));
    }