tech.v3.datatype.errors
Generic, basic error handling. No dependencies aside from apache commons math for NAN exception.
check-idx
macro
(check-idx idx n-elems)
Check that an index is less than n-elems. Throw an index-out-of-bounds exception if that isn't the case.
check-nan-error
macro
(check-nan-error arg)
Check if arg is double NaN and throw an exception if so.
check-offset-length
macro
(check-offset-length offset length elem-ecount)
Check that a combined offset and length fit within elem-ecount. Throw an exception with a nice message in the case where bounds were exceeded.
throw-index-out-of-boundsf
macro
(throw-index-out-of-boundsf msg & args)
Throw an index out of bounds exception with a nice message.
when-not-error
macro
(when-not-error expr error-msg)
Throw an error in the case where expr isn't true.
when-not-errorf
macro
(when-not-errorf expr error-msg & args)
Throw an exception with formatting in the case where expr isn't true.