Add custom error code and message for the case when container format does not support a certain output format.

pull/216/head
castano 16 years ago
parent 6d1891a7e9
commit 5fa27adfcd

@ -493,7 +493,7 @@ bool Compressor::Private::outputHeader(const InputOptions::Private & inputOption
// This container does not support the requested format.
if (outputOptions.errorHandler != NULL)
{
outputOptions.errorHandler->error(Error_UnsupportedFeature);
outputOptions.errorHandler->error(Error_UnsupportedOutputFormat);
}
return false;

@ -42,6 +42,8 @@ const char * nvtt::errorString(Error e)
return "Error opening file";
case Error_FileWrite:
return "Error writing through output handler";
case Error_UnsupportedOutputFormat:
return "The container file does not support the selected output format";
}
return "Invalid error";

@ -280,6 +280,7 @@ namespace nvtt
Error_CudaError,
Error_FileOpen,
Error_FileWrite,
Error_UnsupportedOutputFormat,
};
/// Error handler.

@ -156,6 +156,7 @@ typedef enum
NVTT_Error_Unknown,
NVTT_Error_FileOpen,
NVTT_Error_FileWrite,
NVTT_Error_UnsupportedOutputFormat,
} NvttError;
typedef enum

Loading…
Cancel
Save