38 exception(
const char *msg,
const char *file,
unsigned line,
af_err err);
39 #if AF_API_VERSION >= 33 40 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.
AFAPI void af_get_last_error(char **msg, dim_t *len)
Returns the last error message that occurred and its error message.
friend std::ostream & operator<<(std::ostream &s, const exception &e)
Writes the exception to a stream.
virtual const char * what() const
Returns an error message for the exception in a string format.
AFAPI const char * af_err_to_string(const af_err err)
Converts the af_err error code to its string representation.