source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/error.cc@ 149

Last change on this file since 149 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 2.0 KB
Line 
1/* lib3dv/error.cc
2 *
3 * Copyright (C) 2013 VisLab
4 *
5 * This file is part of lib3dv; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <lib3dv/error.h>
20
21namespace lib3dv
22{
23 std::ostream& operator<< (std::ostream& output, const error& error)
24 {
25 switch(error.m_type)
26 {
27 case(error::NONE) :
28 {
29 output << "NONE";
30 break;
31 }
32
33 case(error::PROPERTY_NOT_FOUND) :
34 {
35 output << "PROPERTY_NOT_FOUND";
36 break;
37 }
38
39 case(error::PROPERTY_READONLY) :
40 {
41 output << "PROPERTY_READONLY";
42 break;
43 }
44
45 case(error::PROPERTY_TYPE_MISMATCH) :
46 {
47 output << "PROPERTY_TYPE_MISMATCH";
48 break;
49 }
50
51 case(error::PROPERTY_VALUE_INVALID) :
52 {
53 output << "PROPERTY_VALUE_INVALID";
54 break;
55 }
56
57 case(error::NETWORK_TIMEOUT) :
58 {
59 output << "NETWORK_TIMEOUT";
60 break;
61 }
62
63 case(error::NETWORK_FAILURE) :
64 {
65 output << "NETWORK_FAILURE";
66 break;
67 }
68
69 default :
70 output << "UNKNOWN";
71 }
72
73 return output;
74 }
75}
Note: See TracBrowser for help on using the repository browser.