39#if AF_API_VERSION >= 33
42 exception(
const char *msg,
const char *func,
const char *file,
unsigned line,
af_err err);
46 virtual const char *
what()
const throw() {
return m_msg; }
50 {
return s << e.
what(); }
An ArrayFire exception class.
exception(const char *msg, const char *file, unsigned line, af_err err)
Creates a new af::exception with a formatted error message for a given an error code,...
exception(const char *msg, const char *func, const char *file, unsigned line, af_err err)
Creates a new exception given a message, function name, file name, line number and error code.
virtual const char * what() const
Returns an error message for the exception in a string format.
exception(const char *msg)
Creates a new af::exception given a message. The error code is AF_ERR_UNKNOWN.
exception(const char *file, unsigned line, af_err err)
Creates a new exception with a formatted error message for a given file and line number in the source...
friend std::ostream & operator<<(std::ostream &s, const exception &e)
Writes the exception to a stream.
AFAPI void af_get_last_error(char **msg, dim_t *len)
Returns the last error message that occurred and its error message.
AFAPI const char * af_err_to_string(const af_err err)
Converts the af_err error code to its string representation.