Panda3D
Loading...
Searching...
No Matches
error_utils.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file error_utils.h
10 * @author mike
11 * @date 2000-11-07
12 */
13
14#ifndef ERROR_UTILS_H
15#define ERROR_UTILS_H
16
17#include "pandabase.h"
18#include "typedef.h"
19
20BEGIN_PUBLISH
21
22enum ErrorUtilCode {
23 EU_http_redirect = 7,
24 EU_eof = 6,
25 EU_network_no_data = 5,
26
27 EU_write_ram = 4,
28 EU_write = 3,
29 EU_ok = 2,
30 EU_success = 1,
31
32 // General errors
33 EU_error_abort = -1,
34 EU_error_file_empty = -2,
35 EU_error_file_invalid = -3,
36 EU_error_invalid_checksum = -4,
37
38 // General network errors
39 EU_error_network_dead = -30,
40 EU_error_network_unreachable = -31,
41 EU_error_network_disconnected = -32,
42 EU_error_network_timeout = -33,
43 EU_error_network_no_data = -34,
44
45 // Local network errors
46 EU_error_network_disconnected_locally = -40,
47 EU_error_network_buffer_overflow = -41,
48 EU_error_network_disk_quota_exceeded = -42,
49
50 // Remote host network errors
51 EU_error_network_remote_host_disconnected = -50,
52 EU_error_network_remote_host_down = -51,
53 EU_error_network_remote_host_unreachable = -52,
54 EU_error_network_remote_host_not_found = -53,
55 EU_error_network_remote_host_no_response = -54,
56
57 // General local errors
58 EU_error_write_out_of_files = -60,
59 EU_error_write_out_of_memory = -61,
60 EU_error_write_sharing_violation = -62,
61 EU_error_write_disk_full = -63,
62 EU_error_write_disk_not_found = -64,
63 EU_error_write_disk_sector_not_found = -65,
64 EU_error_write_disk_fault = -66,
65 EU_error_write_file_rename = -67,
66
67 // HTTP errors
68 EU_error_http_server_timeout = -70,
69 EU_error_http_gateway_timeout = -71,
70 EU_error_http_service_unavailable = -72,
71 EU_error_http_proxy_authentication = -73,
72
73 // Zlib errors
74 EU_error_zlib = -80,
75};
76
77EXPCL_PANDA_EXPRESS std::string error_to_text(ErrorUtilCode err);
78EXPCL_PANDA_EXPRESS int get_write_error();
79
80#ifdef HAVE_NET
81EXPCL_PANDA_EXPRESS std::string handle_socket_error();
82EXPCL_PANDA_EXPRESS int get_network_error();
83#endif
84
85END_PUBLISH
86
87#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.