-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show exception on marshal open failure
- Loading branch information
1 parent
a85bc40
commit aa2ebef
Showing
7 changed files
with
59 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(library | ||
(name kappa_utils) | ||
(libraries unix yojson result logs stdlib-shims bigarray camlp-streams) | ||
(public_name kappa-library.utils) | ||
(flags | ||
(:standard -w @a))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(******************************************************************************) | ||
(* _ __ * The Kappa Language *) | ||
(* | |/ / * Copyright 2010-2020 CNRS - Harvard Medical School - INRIA - IRIF *) | ||
(* | ' / *********************************************************************) | ||
(* | . \ * This file is distributed under the terms of the *) | ||
(* |_|\_\ * GNU Lesser General Public License Version 3 *) | ||
(******************************************************************************) | ||
|
||
let pp_exception f = function | ||
| Exit -> Format.pp_print_string f "Exit" | ||
| Not_found -> Format.pp_print_string f "Not_found" | ||
| Arg.Bad x -> Format.fprintf f "Arg.Bad(%s)" x | ||
| Sys.Break -> Format.pp_print_string f "Sys.Break" | ||
| Stack.Empty -> Format.pp_print_string f "Stack.Empty" | ||
| Queue.Empty -> Format.pp_print_string f "Queue.Empty" | ||
| Stream.Error x -> Format.fprintf f "Stream.Error %s" x | ||
| Stream.Failure -> Format.pp_print_string f "Stream.Failure" | ||
| Arg.Help x -> Format.fprintf f "Arg.Help(%s)" x | ||
| Parsing.Parse_error -> Format.pp_print_string f "Parsing.Parse_error" | ||
| Scanf.Scan_failure x -> Format.fprintf f "Scanf.Scan.failure(%s)" x | ||
| Lazy.Undefined -> Format.pp_print_string f "Lazy.Undefined" | ||
| UnixLabels.Unix_error (er, x, y) -> | ||
Format.fprintf f "UnixLabels.Unix_error(%s,%s,%s)" | ||
(UnixLabels.error_message er) | ||
x y | ||
| Unix.Unix_error (er, x, y) -> | ||
Format.fprintf f "Unix.Unix_error(%s,%s,%s)" (Unix.error_message er) x y | ||
| Failure x -> Format.fprintf f "Failure(%s)" x | ||
| Stack_overflow -> Format.pp_print_string f "Stack_overflow" | ||
| exc -> Format.pp_print_string f (Printexc.to_string exc) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(******************************************************************************) | ||
(* _ __ * The Kappa Language *) | ||
(* | |/ / * Copyright 2010-2020 CNRS - Harvard Medical School - INRIA - IRIF *) | ||
(* | ' / *********************************************************************) | ||
(* | . \ * This file is distributed under the terms of the *) | ||
(* |_|\_\ * GNU Lesser General Public License Version 3 *) | ||
(******************************************************************************) | ||
|
||
|
||
val pp_exception : Format.formatter -> exn -> unit |