public static void csml_push_exception(Exception e) { if (e is MLException) { // Unwrap csml_push(Marshal.ReadIntPtr(((MLException)e).handle)); } else { if (debug_stacktrace) { Csml.WriteLine("STACKTRACE:\n" + e.StackTrace + "\n=====================\n"); Csml.WriteLine("MESSAGE:\n" + e.Message + "\n=====================\n"); } // Wrap csml_push_string(e.Message); csml_push_string(e.GetType().FullName); csml_push_exn(GCHandle.ToIntPtr(GCHandle.Alloc(e))); } }
public void cs2ml() { Csml.csml_push(Csml.csml_get_mlval(handle)); }
public MLException(IntPtr v, string c) : base(c) { handle = Csml.wrap_ocaml_value(v); }
public Callback(IntPtr v) { handle = Csml.wrap_ocaml_value(v); }