Коды ошибок для API MAT-файла
#include "mat.h" matError matGetErrno(MATFile *mfp)
#include "mat.h" matError matGetErrno(mfp) mwPointer mfp
mfp
Указатель на MAT-файл
matError
перечисление кода ошибки
typedef enum { mat_NO_ERROR = 0, mat_UNKNOWN_ERROR, mat_GENERIC_READ_ERROR, mat_GENERIC_WRITE_ERROR, mat_INDEX_TOO_BIG, /* Read-time error indicating that (typically) an index or dimension * written on a 64-bit platform exceeds 2^32, and we're trying to * read it on a 32-bit platform. */ mat_FILE_FORMAT_VIOLATION, /* Read-time error indicating that some data or structure internal to * MAT file is bad - damaged or written improperly. */ mat_FAIL_TO_IDENTIFY, /* Read-time error indicating that the contents of the file do not * match any known type of MAT file. */ mat_BAD_ARGUMENT, /* Unsuitable data was passed to the MAT API */ mat_OUTPUT_BAD_DATA, /* Write-time error indicating that something in the mxArray makes it * not suitable to write. */ mat_FULL_OBJECT_OUTPUT_CONVERT, /* Write-time error indicating that conversion of an object (opaque or * OOPS) to a saveable form, has failed. In this case the object is the * value of a variable, and the variable will not be saved at all. */ mat_PART_OBJECT_OUTPUT_CONVERT, /* Write-time error indicating that conversion of an object (opaque or * OOPS) to a saveable form, has failed. In this case the object is * the value in a field or element of a variable, and the variable * will be saved with an empty in that field or element. */ mat_FULL_OBJECT_INPUT_CONVERT, /* Read-time error indicating that conversion of saveable data * to an object (opaque or OOPS), has failed. In this case the object * is the value of a variable, and the variable has not been loaded. */ mat_PART_OBJECT_INPUT_CONVERT, /* Read-time error indicating that conversion of saveable data * to an object (opaque or OOPS), has failed. In this case the object is * the value in a field or element of a variable, and the variable * will be loaded with an empty in that field or element. */ mat_OPERATION_NOT_SUPPORTED, /* Error indicating that the particular MAT API operation is * not supported on this kind of MAT file, or this kind of stream. */ mat_OUT_OF_MEMORY, /* Operations internal to the MAT library encountered out-of-memory. */ mat_BAD_VARIABLE_NAME, /* The name for a MATLAB variable contains illegal characters, * or exceeds the length allowed for that file format. */ mat_OPERATION_PROHIBITED_IN_WRITE_MODE, /* The operation requested is only available when the file is open in Read or Update mode. For example: matGetDir. */ mat_OPERATION_PROHIBITED_IN_READ_MODE, /* The operation requested is only available when the file is open in Write or Update mode. For example: matPutVariable. */ mat_WRITE_VARIABLE_DOES_NOT_EXIST, /* A write operation that requires a variable already exist did not find the * variable in the file. For example: matDeleteVariable. */ mat_READ_VARIABLE_DOES_NOT_EXIST, /* A read operation that requires a variable already exist did not find the * variable in the file. For example: matGetVariable. */ mat_FILESYSTEM_COULD_NOT_OPEN, /* The MAT module could not open the requested file. */ mat_FILESYSTEM_COULD_NOT_OPEN_TEMPORARY, /* The MAT module could not open a temporary file. */ mat_FILESYSTEM_COULD_NOT_REOPEN, /* The MAT module could not REopen the requested file. */ mat_BAD_OPEN_MODE, /* The mode argument to matOpen did not match any expected value */ mat_FILESYSTEM_ERROR_ON_CLOSE, /* The MAT module got an error while fclose-ing the file. Might indicate a full * filesystem. */ } matError;