peertube.auth
Peertube_auth.Error
Error handling for PeerTube CLI.
This module provides utilities for handling errors and managing exit codes in the CLI.
peertube
ppxlib
yojson
exception Exit_code of int
Exception for CLI exit codes.
val handle_exn : exn -> int
handle_exn exn handles an exception and returns an exit code. Prints formatted error messages for known error types.
handle_exn exn
val wrap : (unit -> int) -> int
wrap f wraps a function to handle errors and return exit codes. Catches exceptions and converts them to appropriate exit codes.
wrap f
val exit_with : int -> 'a
exit_with code raises Exit_code code.
exit_with code
Exit_code code
val fail : string -> 'a
fail msg prints an error message and exits with code 1.
fail msg