Error Codes

enum mocca::ErrorCode

Error codes in case of assertion failure or exception.

Error Categories:

  • 1-9: Type Errors

  • 10-19: Invalid operations

  • 20-29: Dimensions/Length Errors

  • 30-39: Sparse Matrix Errors

  • 40-49: Input/Output Errors

  • 50-59: Monte Carlo Errors

  • 70-79: SIMD Errors

  • 90: Out of Bounds

Values:

enumerator kSuccess

Success.

enumerator kNonNumericType

“Error 1: Only numeric types are supported!”

enumerator kNonIntegerType

“Error 2: Only integral types are supported!”

enumerator kNonFloatingType

“Error 3: Only floating point types are supported!”

enumerator kNonRealType

“Error 4: Only real numerical types are supported!”

enumerator kNonComplexType

“Error 5: Only complex numerical types are supported!”

enumerator kMismatchTypes

“Error 6: A expression cannot contain objects with different types!”

enumerator kMatOnlyMethod

“Error 10: This operation is only valid for matrices”

enumerator kVecOnlyMethod

“Error 11: This operation is only valid for vectors!”

enumerator kNonSquareMat

“Error 12: This operation is only valid for square matrices!”

enumerator kDenseOnly

“Error 13: This operation is only valid for dense types!”

enumerator kSparseOnly

“Error 14: This operation is only valid for sparse types!”

enumerator kInvalidParam

“Error 15: Invalid operation parameters!”

enumerator kNoAbstractExpr

“Error 16: This operation can not be used with expressions!”

enumerator kHaveAliasing

“Error 17: Aliasing detected when evaluating the expression!”

enumerator kInvalidLayout

“Error 18: This sparse layout is not support for this operation!”

enumerator kMismatchLayout

“Error 19: Mismatch type layout!”

enumerator kMismatchDim

“Error 20: Mismatch dimensions between operands!”

enumerator kInvalidSize

“Error 21: Invalid size!”

enumerator kIteratorRange

“Error 22: Iterator range is greater than the matrix dimensions!”

enumerator kReshapeError

“Error 23: Invalid reshape dimensions!”

enumerator kAssignMatToVec

“Error 25: Trying to assign a matrix to a vector!”

enumerator kDenseToSparse

“Error 26: Trying to assign a dense type to a sparse type!”

enumerator kInvalidBroadcast

“Error 29: The operands could not be broadcasted together!”

enumerator kIncorrectCSRInit

“Error 30: The CSRMatrix was not initialized correctly!”

enumerator kTripletOutOfBounds

“Error 31: The triplet array contains out-of-bounds indexes”

enumerator kFileReadErr

“Error 40: Cannot read from file!”

enumerator kFileWriteErr

“Error 41: Cannot write to file!”

enumerator kEmptyFile

“Error 42: The file is empty!”

enumerator kMTXWrongFmt

“Error 43: Wrong MTX file format!”

enumerator kMTXUnsupported

“Error 44: Unsupported MTX matrix type!”

enumerator kMTXDatatype

“Error 45: Unsupported MTX datatype!”,

enumerator kTXTWrongHead

“Error 46: Wrong TXT file header!”

enumerator kMaxTermsExceeded

“Error 50: The maximum number of terms in the Neumann exceeded!”

enumerator kOutOfBounds

“Error 90: The matrix index is out of bounds!”

enumerator kUnsupportedOp

“Error 99: Invalid operation!”