diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-05-22 23:11:51 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-05-22 23:11:51 +0000 |
| commit | e22bbd3273741b4760597ca5c78d6d971bc63e8c (patch) | |
| tree | 3f85f2f35ca41830d4e11c0a42f3667f3ef6a099 | |
| parent | a3aeca4695f475464b7fecd88417bf14c56eeb1d (diff) | |
| download | Sakura-e22bbd3273741b4760597ca5c78d6d971bc63e8c.tar.gz Sakura-e22bbd3273741b4760597ca5c78d6d971bc63e8c.zip | |
Just inherit the errors from NT and the sublanguages
| -rw-r--r-- | lib/listener.ml | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/listener.ml b/lib/listener.ml index 4b1a0c5..74b7a8e 100644 --- a/lib/listener.ml +++ b/lib/listener.ml @@ -20,10 +20,6 @@ functor condition "unrecognized-sublanguage" ("tag" |=| (of_string tag)) - let sublanguage_error expr = (* FIXME: do away with this *) - condition "sublanguage-error" - ("error" |=| (of_sexp expr)) - let malformed_expression expr = condition "malformed-expression" ("expression" |=| (of_sexp expr)) @@ -94,8 +90,6 @@ functor let execute_sublanguage ctx expr (module Language : SubS) = Language.parse_sexp expr |> Utilities.Result.fmap (Language.execute ctx) - |> Result.map_error (fun e -> - Error.sublanguage_error (Language.sexp_of_error e)) let execute_command ctx = function | Sexplib.Sexp.(List [ Atom tag; expr ]) -> @@ -173,11 +167,11 @@ functor match NT.authenticate Nt.PlainText with | Error e -> (* FIXME: why is this a syntax error? *) - send_error output (Error.syntax_error (Nt.string_of_error e)) + send_error output e | Ok claims -> (match Sess.open_session claims ~branch_name:"master" with | Error e -> - send_error output (Error.syntax_error (Nt.string_of_error e)) + send_error output e | Ok sess -> let state = ref { claims; session = sess } in (try |
