mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
Error Codes

The mxlib error codes and utility functions.

Enumerations

enum class  mx::error_t {
  mx::error_t::noerror , mx::error_t::error , mx::error_t::invalidarg , mx::error_t::invalidconfig ,
  mx::error_t::notimpl , mx::error_t::paramnotset , mx::error_t::envnotset , mx::error_t::notfound ,
  mx::error_t::sizeerr , mx::error_t::allocerr , mx::error_t::freeerr , mx::error_t::parseerr ,
  mx::error_t::filesystem , mx::error_t::fileoerr , mx::error_t::filewerr , mx::error_t::filererr ,
  mx::error_t::filecerr , mx::error_t::filenotfound , mx::error_t::fileempty , mx::error_t::dirnotfound ,
  mx::error_t::dirempty , mx::error_t::procerr , mx::error_t::timeout , mx::error_t::liberr ,
  mx::error_t::exception , mx::error_t::std_logic_error , mx::error_t::std_invalid_argument , mx::error_t::std_domain_error ,
  mx::error_t::std_length_error , mx::error_t::std_out_of_range , mx::error_t::std_future_error , mx::error_t::std_bad_optional_access ,
  mx::error_t::gnuploterr , mx::error_t::lapackerr , mx::error_t::e2big , mx::error_t::eacces ,
  mx::error_t::eaddrinuse , mx::error_t::eaddrnotavail , mx::error_t::eafnosupport , mx::error_t::eagain ,
  mx::error_t::ealready , mx::error_t::ebadf , mx::error_t::ebadmsg , mx::error_t::ebusy ,
  mx::error_t::ecanceled , mx::error_t::echild , mx::error_t::econnaborted , mx::error_t::econnrefused ,
  mx::error_t::econnreset , mx::error_t::edestaddrreq , mx::error_t::edom , mx::error_t::eexist ,
  mx::error_t::efault , mx::error_t::efbig , mx::error_t::ehostunreach , mx::error_t::eidrm ,
  mx::error_t::eilseq , mx::error_t::einprogress , mx::error_t::eintr , mx::error_t::einval ,
  mx::error_t::eio , mx::error_t::eisconn , mx::error_t::eisdir , mx::error_t::eloop ,
  mx::error_t::emfile , mx::error_t::emlink , mx::error_t::emsgsize , mx::error_t::enametoolong ,
  mx::error_t::enetdown , mx::error_t::enetreset , mx::error_t::enetunreach , mx::error_t::enfile ,
  mx::error_t::enobufs , mx::error_t::enodata , mx::error_t::enodev , mx::error_t::enoent ,
  mx::error_t::enoexec , mx::error_t::enolck , mx::error_t::enolink , mx::error_t::enomem ,
  mx::error_t::enomsg , mx::error_t::enoprotoopt , mx::error_t::enospc , mx::error_t::enosr ,
  mx::error_t::enostr , mx::error_t::enosys , mx::error_t::enotconn , mx::error_t::enotdir ,
  mx::error_t::enotempty , mx::error_t::enotrecoverable , mx::error_t::enotsock , mx::error_t::enotsup ,
  mx::error_t::enotty , mx::error_t::enxio , mx::error_t::eopnotsupp , mx::error_t::eoverflow ,
  mx::error_t::eownerdead , mx::error_t::eperm , mx::error_t::epipe , mx::error_t::eproto ,
  mx::error_t::eprotonosupport , mx::error_t::eprototype , mx::error_t::erange , mx::error_t::erofs ,
  mx::error_t::espipe , mx::error_t::esrch , mx::error_t::etime , mx::error_t::etimedout ,
  mx::error_t::etxtbsy , mx::error_t::ewouldblock , mx::error_t::exdev
}
 The mxlib error codes. More...
 

Functions

static constexpr const char * mx::errorName (const error_t &errc)
 Convert an error_t code to its name.
 
static constexpr const char * mx::errorMessage (const error_t &errc)
 Get the descriptive message for an error_t code.
 
static constexpr error_t mx::errno2error_t (const int &err)
 Convert an errno code to error_t.
 

Enumeration Type Documentation

◆ error_t

enum class mx::error_t
strong

The mxlib error codes.

Enumerator
noerror 

No error has occurred.

error 

A general error has occurred.

invalidarg 

An argument was invalid.

invalidconfig 

A config setting was invalid.

notimpl 

A component or technique is not implemented.

paramnotset 

A parameter was not set.

envnotset 

A environment variable was not set.

notfound 

An item was not found.

sizeerr 

A size was invalid or calculated incorrectly.

allocerr 

An error occurred during memory allocation.

freeerr 

An error occurred during memory de-allocation.

parseerr 

A parsing error occurred.

filesystem 

A general filesystem error occurred.

fileoerr 

An error occurred while opening a file.

filewerr 

An error occurred while writing to a file.

filererr 

An error occurred while reading from a file.

filecerr 

An error occurred while closing a file.

filenotfound 

The file was not found.

fileempty 

The file is empty.

dirnotfound 

The directory was not found.

dirempty 

The directory was empty.

procerr 

An error occurred while starting a process.

timeout 

A timeout occurred.

liberr 

An error was returned by a library.

exception 

An exception was thrown.

std_logic_error 

A logic error exception was thrown.

std_invalid_argument 

An invalid argument exception was thrown.

std_domain_error 

A domain error exception was thrown.

std_length_error 

A length error exception was thrown.

std_out_of_range 

An out of range exception was thrown.

std_future_error 

A future error exception was thrown.

std_bad_optional_access 

A bad optional access exception was thrown.

gnuploterr 

An error was returned by gnuplot.

lapackerr 

An error was returned by Lapack.

e2big 

Argument list too long (E2BIG)

eacces 

Permission denied (EACCES)

eaddrinuse 

Address already in use (EADDRINUSE)

eaddrnotavail 

Cannot assign requested address (EADDRNOTAVAIL)

eafnosupport 

Address family not supported by protocol (EAFNOSUPPORT)

eagain 

Resource temporarily unavailable (EAGAIN)

ealready 

Operation already in progress (EALREADY)

ebadf 

Bad file descriptor (EBADF)

ebadmsg 

Bad message (EBADMSG)

ebusy 

Device or resource busy (EBUSY)

ecanceled 

Operation canceled (ECANCELED)

echild 

No child processes (ECHILD)

econnaborted 

Software caused connection abort (ECONNABORTED)

econnrefused 

Connection refused (ECONNREFUSED)

econnreset 

Connection reset by peer (ECONNRESET)

edestaddrreq 

Destination address required (EDESTADDRREQ)

edom 

Numerical argument out of domain (EDOM)

eexist 

File exists (EEXIST)

efault 

Bad address (EFAULT)

efbig 

File too large (EFBIG)

ehostunreach 

No route to host (EHOSTUNREACH)

eidrm 

Identifier removed (EIDRM)

eilseq 

Invalid or incomplete multibyte or wide character (EILSEQ)

einprogress 

Operation now in progress (EINPROGRESS)

eintr 

Interrupted system call (EINTR)

einval 

Invalid argument (EINVAL)

eio 

Input/output error (EIO)

eisconn 

Transport endpoint is already connected (EISCONN)

eisdir 

Is a directory (EISDIR)

eloop 

Too many levels of symbolic links (ELOOP)

emfile 

Too many open files (EMFILE)

emlink 

Too many links (EMLINK)

emsgsize 

Message too long (EMSGSIZE)

enametoolong 

File name too long (ENAMETOOLONG)

enetdown 

Network is down (ENETDOWN)

enetreset 

Network dropped connection on reset (ENETRESET)

enetunreach 

Network is unreachable (ENETUNREACH)

enfile 

Too many open files in system (ENFILE)

enobufs 

No buffer space available (ENOBUFS)

enodata 

No data available (ENODATA)

enodev 

No such device (ENODEV)

enoent 

No such file or directory (ENOENT)

enoexec 

Exec format error (ENOEXEC)

enolck 

No locks available (ENOLCK)

enolink 

Link has been severed (ENOLINK)

enomem 

Cannot allocate memory (ENOMEM)

enomsg 

No message of desired type (ENOMSG)

enoprotoopt 

Protocol not available (ENOPROTOOPT)

enospc 

No space left on device (ENOSPC)

enosr 

Out of streams resources (ENOSR)

enostr 

Device not a stream (ENOSTR)

enosys 

Function not implemented (ENOSYS)

enotconn 

Transport endpoint is not connected (ENOTCONN)

enotdir 

Not a directory (ENOTDIR)

enotempty 

Directory not empty (ENOTEMPTY)

enotrecoverable 

State not recoverable (ENOTRECOVERABLE)

enotsock 

Socket operation on non-socket (ENOTSOCK)

enotsup 

Operation not supported (ENOTSUP)

enotty 

Inappropriate ioctl for device (ENOTTY)

enxio 

No such device or address (ENXIO)

eopnotsupp 

Operation not supported (EOPNOTSUPP)

eoverflow 

Value too large for defined data type (EOVERFLOW)

eownerdead 

Owner died (EOWNERDEAD)

eperm 

Operation not permitted (EPERM)

epipe 

Broken pipe (EPIPE)

eproto 

Protocol error (EPROTO)

eprotonosupport 

Protocol not supported (EPROTONOSUPPORT)

eprototype 

Protocol wrong type for socket (EPROTOTYPE)

erange 

Numerical result out of range (ERANGE)

erofs 

Read-only file system (EROFS)

espipe 

Illegal seek (ESPIPE)

esrch 

No such process (ESRCH)

etime 

Timer expired (ETIME)

etimedout 

Connection timed out (ETIMEDOUT)

etxtbsy 

Text file busy (ETXTBSY)

ewouldblock 

Resource temporarily unavailable (EWOULDBLOCK)

exdev 

Invalid cross-device link (EXDEV)

Definition at line 19 of file error_t.hpp.

Function Documentation

◆ errno2error_t()

◆ errorMessage()

static constexpr const char * mx::errorMessage ( const error_t errc)
staticconstexpr

Get the descriptive message for an error_t code.

Returns
the descriptive message corresponding to the error_t code
Parameters
[in]errcthe error code for which to get the message

Definition at line 377 of file error_t.hpp.

References mx::allocerr, mx::dirempty, mx::dirnotfound, mx::e2big, mx::eacces, mx::eaddrinuse, mx::eaddrnotavail, mx::eafnosupport, mx::eagain, mx::ealready, mx::ebadf, mx::ebadmsg, mx::ebusy, mx::ecanceled, mx::echild, mx::econnaborted, mx::econnrefused, mx::econnreset, mx::edestaddrreq, mx::edom, mx::eexist, mx::efault, mx::efbig, mx::ehostunreach, mx::eidrm, mx::eilseq, mx::einprogress, mx::eintr, mx::einval, mx::eio, mx::eisconn, mx::eisdir, mx::eloop, mx::emfile, mx::emlink, mx::emsgsize, mx::enametoolong, mx::enetdown, mx::enetreset, mx::enetunreach, mx::enfile, mx::enobufs, mx::enodata, mx::enodev, mx::enoent, mx::enoexec, mx::enolck, mx::enolink, mx::enomem, mx::enomsg, mx::enoprotoopt, mx::enospc, mx::enosr, mx::enostr, mx::enosys, mx::enotconn, mx::enotdir, mx::enotempty, mx::enotrecoverable, mx::enotsock, mx::enotsup, mx::enotty, mx::envnotset, mx::enxio, mx::eopnotsupp, mx::eoverflow, mx::eownerdead, mx::eperm, mx::epipe, mx::eproto, mx::eprotonosupport, mx::eprototype, mx::erange, mx::erofs, mx::error, mx::espipe, mx::esrch, mx::etime, mx::etimedout, mx::etxtbsy, mx::ewouldblock, mx::exception, mx::exdev, mx::filecerr, mx::fileempty, mx::filenotfound, mx::fileoerr, mx::filererr, mx::filesystem, mx::filewerr, mx::freeerr, mx::gnuploterr, mx::invalidarg, mx::invalidconfig, mx::lapackerr, mx::liberr, mx::noerror, mx::notfound, mx::notimpl, mx::paramnotset, mx::parseerr, mx::procerr, mx::sizeerr, mx::std_bad_optional_access, mx::std_domain_error, mx::std_future_error, mx::std_invalid_argument, mx::std_length_error, mx::std_logic_error, mx::std_out_of_range, and mx::timeout.

Referenced by mx::error_message< verbose::vvv >(), mx::error_message< verbose::vvv >(), mx::internal::mxlib_error_message< verbose::vv >(), mx::internal::mxlib_error_message< verbose::vv >(), mx::internal::mxlib_error_message< verbose::vvv >(), and mx::internal::mxlib_error_message< verbose::vvv >().

◆ errorName()

static constexpr const char * mx::errorName ( const error_t errc)
staticconstexpr

Convert an error_t code to its name.

Returns
the name of the error_t code
Parameters
[in]errcthe error code to convert

Definition at line 140 of file error_t.hpp.

References mx::allocerr, mx::dirempty, mx::dirnotfound, mx::e2big, mx::eacces, mx::eaddrinuse, mx::eaddrnotavail, mx::eafnosupport, mx::eagain, mx::ealready, mx::ebadf, mx::ebadmsg, mx::ebusy, mx::ecanceled, mx::echild, mx::econnaborted, mx::econnrefused, mx::econnreset, mx::edestaddrreq, mx::edom, mx::eexist, mx::efault, mx::efbig, mx::ehostunreach, mx::eidrm, mx::eilseq, mx::einprogress, mx::eintr, mx::einval, mx::eio, mx::eisconn, mx::eisdir, mx::eloop, mx::emfile, mx::emlink, mx::emsgsize, mx::enametoolong, mx::enetdown, mx::enetreset, mx::enetunreach, mx::enfile, mx::enobufs, mx::enodata, mx::enodev, mx::enoent, mx::enoexec, mx::enolck, mx::enolink, mx::enomem, mx::enomsg, mx::enoprotoopt, mx::enospc, mx::enosr, mx::enostr, mx::enosys, mx::enotconn, mx::enotdir, mx::enotempty, mx::enotrecoverable, mx::enotsock, mx::enotsup, mx::enotty, mx::envnotset, mx::enxio, mx::eopnotsupp, mx::eoverflow, mx::eownerdead, mx::eperm, mx::epipe, mx::eproto, mx::eprotonosupport, mx::eprototype, mx::erange, mx::erofs, mx::error, mx::espipe, mx::esrch, mx::etime, mx::etimedout, mx::etxtbsy, mx::ewouldblock, mx::exception, mx::exdev, mx::filecerr, mx::fileempty, mx::filenotfound, mx::fileoerr, mx::filererr, mx::filesystem, mx::filewerr, mx::freeerr, mx::gnuploterr, mx::invalidarg, mx::invalidconfig, mx::lapackerr, mx::liberr, mx::noerror, mx::notfound, mx::notimpl, mx::paramnotset, mx::parseerr, mx::procerr, mx::sizeerr, mx::std_bad_optional_access, mx::std_domain_error, mx::std_future_error, mx::std_invalid_argument, mx::std_length_error, mx::std_logic_error, mx::std_out_of_range, and mx::timeout.

Referenced by mx::error_message< verbose::vvv >(), mx::error_message< verbose::vvv >(), mx::internal::mxlib_error_message< verbose::v >(), mx::internal::mxlib_error_message< verbose::v >(), mx::internal::mxlib_error_message< verbose::vv >(), mx::internal::mxlib_error_message< verbose::vv >(), mx::internal::mxlib_error_message< verbose::vvv >(), and mx::internal::mxlib_error_message< verbose::vvv >().