Add custom error code and message for the case when container format does not support a certain output format.
This commit is contained in:
parent
6d1891a7e9
commit
5fa27adfcd
@ -493,7 +493,7 @@ bool Compressor::Private::outputHeader(const InputOptions::Private & inputOption
|
|||||||
// This container does not support the requested format.
|
// This container does not support the requested format.
|
||||||
if (outputOptions.errorHandler != NULL)
|
if (outputOptions.errorHandler != NULL)
|
||||||
{
|
{
|
||||||
outputOptions.errorHandler->error(Error_UnsupportedFeature);
|
outputOptions.errorHandler->error(Error_UnsupportedOutputFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -42,6 +42,8 @@ const char * nvtt::errorString(Error e)
|
|||||||
return "Error opening file";
|
return "Error opening file";
|
||||||
case Error_FileWrite:
|
case Error_FileWrite:
|
||||||
return "Error writing through output handler";
|
return "Error writing through output handler";
|
||||||
|
case Error_UnsupportedOutputFormat:
|
||||||
|
return "The container file does not support the selected output format";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "Invalid error";
|
return "Invalid error";
|
||||||
|
@ -280,6 +280,7 @@ namespace nvtt
|
|||||||
Error_CudaError,
|
Error_CudaError,
|
||||||
Error_FileOpen,
|
Error_FileOpen,
|
||||||
Error_FileWrite,
|
Error_FileWrite,
|
||||||
|
Error_UnsupportedOutputFormat,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Error handler.
|
/// Error handler.
|
||||||
|
@ -156,6 +156,7 @@ typedef enum
|
|||||||
NVTT_Error_Unknown,
|
NVTT_Error_Unknown,
|
||||||
NVTT_Error_FileOpen,
|
NVTT_Error_FileOpen,
|
||||||
NVTT_Error_FileWrite,
|
NVTT_Error_FileWrite,
|
||||||
|
NVTT_Error_UnsupportedOutputFormat,
|
||||||
} NvttError;
|
} NvttError;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
Loading…
Reference in New Issue
Block a user