| 1 |
/*****************************************************************************/ |
| 2 |
// Copyright 2006-2019 Adobe Systems Incorporated |
| 3 |
// All Rights Reserved. |
| 4 |
// |
| 5 |
// NOTICE: Adobe permits you to use, modify, and distribute this file in |
| 6 |
// accordance with the terms of the Adobe license agreement accompanying it. |
| 7 |
/*****************************************************************************/ |
| 8 |
|
| 9 |
/** \file |
| 10 |
* Error code values. |
| 11 |
*/ |
| 12 |
|
| 13 |
/*****************************************************************************/ |
| 14 |
|
| 15 |
#ifndef __dng_errors__ |
| 16 |
#define __dng_errors__ |
| 17 |
|
| 18 |
/*****************************************************************************/ |
| 19 |
|
| 20 |
#include "dng_types.h" |
| 21 |
|
| 22 |
#include <atomic> |
| 23 |
|
| 24 |
/*****************************************************************************/ |
| 25 |
|
| 26 |
/// Type for all errors used in DNG SDK. Generally held inside a dng_exception. |
| 27 |
|
| 28 |
typedef int32 dng_error_code; |
| 29 |
|
| 30 |
typedef std::atomic<dng_error_code> dng_atomic_error_code; |
| 31 |
|
| 32 |
enum |
| 33 |
{ |
| 34 |
dng_error_none = 0, //!< No error. Success. |
| 35 |
dng_error_unknown = 100000, //!< Logic or program error or other unclassifiable error. |
| 36 |
dng_error_not_yet_implemented, //!< Functionality requested is not yet implemented. |
| 37 |
dng_error_silent, //!< An error which should not be signalled to user. |
| 38 |
dng_error_user_canceled, //!< Processing stopped by user (or host application) request |
| 39 |
dng_error_host_insufficient, //!< Necessary host functionality is not present. |
| 40 |
dng_error_memory, //!< Out of memory. |
| 41 |
dng_error_bad_format, //!< File format is not valid. |
| 42 |
dng_error_matrix_math, //!< Matrix has wrong shape, is badly conditioned, or similar problem. |
| 43 |
dng_error_open_file, //!< Could not open file. |
| 44 |
dng_error_read_file, //!< Error reading file. |
| 45 |
dng_error_write_file, //!< Error writing file. |
| 46 |
dng_error_end_of_file, //!< Unexpected end of file. |
| 47 |
dng_error_file_is_damaged, //!< File is damaged in some way. |
| 48 |
dng_error_image_too_big_dng, //!< Image is too big to save as DNG. |
| 49 |
dng_error_image_too_big_tiff, //!< Image is too big to save as TIFF. |
| 50 |
dng_error_unsupported_dng, //!< DNG version is unsupported. |
| 51 |
dng_error_overflow, //!< Arithmetic overflow. |
| 52 |
dng_error_jxl_encoder, //!< JPEG XL encoder error. |
| 53 |
dng_error_jxl_decoder, //!< JPEG XL decoder error. |
| 54 |
}; |
| 55 |
|
| 56 |
/*****************************************************************************/ |
| 57 |
|
| 58 |
#endif |
| 59 |
|
| 60 |
/*****************************************************************************/ |