AVPKit
IError.cpp
1 /*******************************************************************************
2  * Copyright (c) 2024, 2026, Olivier Ayache. All rights reserved.
3  *
4  * This file is part of AVPKit.
5  *
6  * AVPKit is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * AVPKit is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with AVPKit. If not, see <http://www.gnu.org/licenses/>.
18  *******************************************************************************/
19 
20 /*
21  * IError.cpp
22  *
23  * Created on: Mar 20, 2009
24  * Author: aclarke
25  */
26 
27 #include <com/avpkit/core/IError.h>
28 #include <com/avpkit/core/Error.h>
29 
30 namespace com { namespace avpkit { namespace core
31 {
32 
33 IError :: IError()
34 {
35 
36 }
37 
38 IError :: ~IError()
39 {
40 
41 }
42 
43 IError*
44 IError :: make(int32_t errorNumber)
45 {
46  return Error::make(errorNumber);
47 }
48 
49 IError*
51 {
52  return Error::make(type);
53 }
54 
55 int32_t
57 {
58  return Error::typeToErrorNumber(type);
59 }
60 
63 {
64  return Error::errorNumberToType(errNo);
65 }
66 
67 }}}
Maps from int return codes to defined Error values.
Definition: IError.h:60
static int32_t typeToErrorNumber(Type type)
Translate an a type to an error number.
Definition: IError.cpp:56
static IError * make(int32_t errorNumber)
Create a new IError object from a return value passed in from AVPKit.
Definition: IError.cpp:44
static Type errorNumberToType(int32_t errorNo)
Translate an error number to a type.
Definition: IError.cpp:62
Type
A set of errors that AVPKit knows about.
Definition: IError.h:65
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...