| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef _FWL_ERROR_H | 7 #ifndef _FWL_ERROR_H |
| 8 #define _FWL_ERROR_H | 8 #define _FWL_ERROR_H |
| 9 typedef FX_INT32» FWL_ERR; | 9 typedef int32_t»FWL_ERR; |
| 10 #define FWL_ERR_Succeeded 0 | 10 #define FWL_ERR_Succeeded 0 |
| 11 #define FWL_ERR_Indefinite -1 | 11 #define FWL_ERR_Indefinite -1 |
| 12 #define FWL_ERR_Parameter_Invalid -100 | 12 #define FWL_ERR_Parameter_Invalid -100 |
| 13 #define FWL_ERR_Property_Invalid -200 | 13 #define FWL_ERR_Property_Invalid -200 |
| 14 #define FWL_ERR_Intermediate_Value__Invalid -300 | 14 #define FWL_ERR_Intermediate_Value__Invalid -300 |
| 15 #define FWL_ERR_Method_Not_Supported -400 | 15 #define FWL_ERR_Method_Not_Supported -400 |
| 16 #define FWL_ERR_Out_Of_Memory -500 | 16 #define FWL_ERR_Out_Of_Memory -500 |
| 17 #if defined (__WIN32__) || defined (_WIN32) | 17 #if defined (__WIN32__) || defined (_WIN32) |
| 18 #define _FWL_ALARM_IF_FAIL(arg, alarm) { if (!(arg)) ::OutputDebugString(alarm);
} | 18 #define _FWL_ALARM_IF_FAIL(arg, alarm) { if (!(arg)) ::OutputDebugString(alarm);
} |
| 19 #elif defined (__linux) || defined (linux) || defined (__APPLE__) || defined (__
MACOSX__) | 19 #elif defined (__linux) || defined (linux) || defined (__APPLE__) || defined (__
MACOSX__) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 { \ | 41 { \ |
| 42 if ((arg) != FWL_ERR_Succeeded) \ | 42 if ((arg) != FWL_ERR_Succeeded) \ |
| 43 printf("%d\n", arg); \ | 43 printf("%d\n", arg); \ |
| 44 } | 44 } |
| 45 #else | 45 #else |
| 46 #endif | 46 #endif |
| 47 #define _FWL_ERR_CHECK_RETURN_IF_FAIL(arg) { if ((arg) != FWL_ERR_Succeeded) ret
urn; } | 47 #define _FWL_ERR_CHECK_RETURN_IF_FAIL(arg) { if ((arg) != FWL_ERR_Succeeded) ret
urn; } |
| 48 #define _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) { if ((arg) != FWL_ERR_Suc
ceeded) return val; } | 48 #define _FWL_ERR_CHECK_RETURN_VALUE_IF_FAIL(arg, val) { if ((arg) != FWL_ERR_Suc
ceeded) return val; } |
| 49 #define _FWL_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) { if ((arg) != FWL_ERR_Su
cceeded) goto pos; } | 49 #define _FWL_ERR_CHECK_GOTO_POSITION_IF_FAIL(arg, pos) { if ((arg) != FWL_ERR_Su
cceeded) goto pos; } |
| 50 #endif | 50 #endif |
| OLD | NEW |