Module Mssql__.Mssql_error
type t
=
{
msg : string;
reraised_exn : Core_kernel.Exn.t option;
here : Core_kernel.Source_code_position.t;
query : string option;
params : Mssql__.Db_field.t option list;
formatted_query : string option;
results : Mssql.Row.t list list;
}
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
exception
Mssql_error of t
val failwith : ?query:string -> ?params:Mssql__.Db_field.t option list -> ?formatted_query:string -> ?results:Mssql.Row.t list list -> ?exn:Core_kernel.Exn.t -> ?backtrace:Core_kernel.Caml.Printexc.raw_backtrace -> Core_kernel.Source_code_position.t -> string -> _
failwith [%here] msg
raises aMssql_error
with the given options and message
val failwithf : ?query:string -> ?params:Mssql__.Db_field.t option list -> ?formatted_query:string -> ?results:Mssql.Row.t list list -> ?exn:Core_kernel.Exn.t -> ?backtrace:Core_kernel.Caml.Printexc.raw_backtrace -> Core_kernel.Source_code_position.t -> ('a, unit, string, _) Core_kernel.format4 -> 'a
failwithf [%here] "%..." msg
raises aMssql_error
with the given options and a sprintf formatted message
val with_wrap : ?query:string -> ?params:Mssql__.Db_field.t option list -> ?formatted_query:string -> ?results:Mssql.Row.t list list -> Core_kernel.Source_code_position.t -> (unit -> 'a) -> 'a
with_wrap_dblib_error [%here] f
callsf
and if it throws an exception, wraps the error inMssql_error
. There are special cases for if the exn thrown is alreadyMssql_error
(we always preserve the%here
and preserve the other info if not set), and forDblib.Error
(using the message directly, to make exceptions more readable -- although we also setreraised_exn
so the original info is all there)