Module Skhclibs.ErrorSource

Operations on errors.

Sourcetype t =
  1. | SqlError of {
    1. rc : Sqlite3.Rc.t;
    2. message : string;
    }
    (*

    SqlError occures while manipulating the database

    *)
  2. | LoadConfigError of SkhcConfig.Err.t
    (*

    LoadConfigError occures when trying to load a configuration file.

    *)
  3. | FileCreation of string
    (*

    FileCreation occures when a file creation file.

    *)
  4. | Message of string
    (*

    Message is a raw error message.

    *)
  5. | Exn of exn
    (*

    Exn is an exception.

    *)

type of shakuhachi error.

Sourceval sql_error : Sqlite3.Rc.t -> string -> t

sql_error rc msg creates a sql error with rc and msg.

Sourceval sql_error' : (Sqlite3.Rc.t * string) -> t

sql_error (rc, msg) creates a sql error with rc and msg.

Sourceval load_config_error : SkhcConfig.Err.t -> t

load_config_error error creates an error from a SkhcConfig.Err.t error.

Sourceval file_creation : string -> t

file_creation msg cretes an error when a file creation file.

Sourceval message : string -> t

message msg creates a message from msg.

Sourceval message' : ('a, Format.formatter, unit, t) format4 -> 'a

message' fmt is message but takes a format instead of a string.

Sourceval exn : exn -> t

exn e creates an error from a cought exception.

Sourceval to_string : t -> string

to_string e is the string representation of e.