aboutsummaryrefslogtreecommitdiffstats
path: root/lib/error.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-26 15:30:53 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-26 15:30:53 -0300
commite32ba6294781691846c3ab19281fe977350b4d0f (patch)
treef38e92ba2fc03e966d7263c7ee2e0b5d7983ebae /lib/error.ml
parentbe375a52da6174dfda5b68617d27e1542cc80499 (diff)
downloadSakura-e32ba6294781691846c3ab19281fe977350b4d0f.tar.gz
Sakura-e32ba6294781691846c3ab19281fe977350b4d0f.zip
preparation cleanup for RNT integration
Diffstat (limited to 'lib/error.ml')
-rw-r--r--lib/error.ml35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/error.ml b/lib/error.ml
deleted file mode 100644
index 4f1cecd..0000000
--- a/lib/error.ml
+++ /dev/null
@@ -1,35 +0,0 @@
-(** Error types for manipulation operations *)
-type t =
- | RelationNotFound of string
- | RelationAlreadyExists of string
- | TupleNotFound of Conventions.Hash.t
- | DuplicateTuple of Conventions.Hash.t
- | ConstraintViolation of string
- | StorageError of string
- | UnrecognizedSublanguage of string
- | MalformedExpression of Sexplib.Sexp.t
- (* TODO: think of a better way to manage and serialize sublanguage errors *)
- | SublanguageError of Sexplib.Sexp.t
- | Conflict of {old_db: Management.Multigroup.multigroup; new_db: Management.Multigroup.multigroup}
- | SyntaxError of string
- | MultigroupNotFound of string
-
-let sexp_of_error e =
- let open Sexplib.Sexp in
- let error e ps = List (Atom e :: ps) in
- let ( <+> ) key value = List [Atom key; value] in
- match e with
- (* TODO: think of a subset of common attributes that every error should have (message, etc)? *)
- | RelationNotFound s -> error "relation-not-found" ["relation" <+> Atom s]
- | RelationAlreadyExists s -> error "relation-already-exists" ["relation" <+> Atom s]
- | TupleNotFound h -> error "tuple-not-found" ["hash" <+> Atom h]
- | DuplicateTuple h -> error "duplicate-tuple" ["hash" <+> Atom h]
- | ConstraintViolation s -> error "constraint-violation" ["message" <+> Atom s]
- | StorageError s -> error "storage-error" ["message" <+> Atom s]
- | UnrecognizedSublanguage s -> error "unrecognized-sublanguage" ["tag" <+> Atom s]
- | MalformedExpression s -> error "malformed-expression" ["expression" <+> s]
- | SublanguageError s -> error "sublanguage-error" ["error" <+> s]
- | SyntaxError s -> error "syntax-error" ["message" <+> Atom s]
- | MultigroupNotFound s -> error "multigroup-not-found" ["name" <+> Atom s]
- | Conflict {old_db; new_db} ->
- error "conflict" ["old" <+> Atom old_db#name; "new" <+> Atom new_db#name]