GDAL
cpl_vsi_error.h
1/******************************************************************************
2 * $Id: cpl_vsi_error.h 1515758e53dd91f1c7f21f1e075e0c88e0e17fea 2016-12-10 01:44:43Z Kurt Schwehr $
3 *
4 * Project: VSI Virtual File System
5 * Purpose: Implement an error system for reporting file system errors.
6 * Filesystem errors need to be handled separately from the
7 * CPLError architecture because they are potentially ignored.
8 * Author: Rob Emanuele, rdemanuele at gmail.com
9 *
10 ******************************************************************************
11 * Copyright (c) 2016, Rob Emanuele <rdemanuele at gmail.com>
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
19 *
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
30 ****************************************************************************/
31
32#ifndef CPL_VSI_ERROR_H_INCLUDED
33#define CPL_VSI_ERROR_H_INCLUDED
34
35#include "cpl_port.h"
36#include "cpl_error.h"
37
38/* ====================================================================
39 Filesystem error codes.
40 ==================================================================== */
41
43
44typedef int VSIErrorNum;
45
46#define VSIE_None 0
47#define VSIE_FileError 1
48#define VSIE_HttpError 2
49
50#define VSIE_AWSError 5
51#define VSIE_AWSAccessDenied 6
52#define VSIE_AWSBucketNotFound 7
53#define VSIE_AWSObjectNotFound 8
54#define VSIE_AWSInvalidCredentials 9
55#define VSIE_AWSSignatureDoesNotMatch 10
56
57void CPL_DLL VSIError( VSIErrorNum err_no,
58 CPL_FORMAT_STRING(const char *fmt), ... )
60
61void CPL_DLL CPL_STDCALL VSIErrorReset( void );
62VSIErrorNum CPL_DLL CPL_STDCALL VSIGetLastErrorNo( void );
63const char CPL_DLL * CPL_STDCALL VSIGetLastErrorMsg( void );
64
65int CPL_DLL CPL_STDCALL VSIToCPLError( CPLErr eErrClass,
66 CPLErrorNum eDefaultErrorNo );
67
69
70#endif /* CPL_VSI_ERROR_H_INCLUDED */
CPL error handling services.
CPLErr
Error category.
Definition: cpl_error.h:53
int CPLErrorNum
Error number.
Definition: cpl_error.h:94
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
#define CPL_FORMAT_STRING(arg)
Macro into which to wrap the format argument of a printf-like function.
Definition: cpl_port.h:929
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have printf() formatting.
Definition: cpl_port.h:914

Generated for GDAL by doxygen 1.9.4.