| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | /*************************************************************************/ | 
					
						
							|  |  |  | /*  error_list.h                                                         */ | 
					
						
							|  |  |  | /*************************************************************************/ | 
					
						
							|  |  |  | /*                       This file is part of:                           */ | 
					
						
							|  |  |  | /*                           GODOT ENGINE                                */ | 
					
						
							| 
									
										
										
										
											2017-08-27 14:16:55 +02:00
										 |  |  | /*                      https://godotengine.org                          */ | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | /*************************************************************************/ | 
					
						
							| 
									
										
										
										
											2022-01-13 09:45:09 +01:00
										 |  |  | /* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.                 */ | 
					
						
							|  |  |  | /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).   */ | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | /*                                                                       */ | 
					
						
							|  |  |  | /* Permission is hereby granted, free of charge, to any person obtaining */ | 
					
						
							|  |  |  | /* a copy of this software and associated documentation files (the       */ | 
					
						
							|  |  |  | /* "Software"), to deal in the Software without restriction, including   */ | 
					
						
							|  |  |  | /* without limitation the rights to use, copy, modify, merge, publish,   */ | 
					
						
							|  |  |  | /* distribute, sublicense, and/or sell copies of the Software, and to    */ | 
					
						
							|  |  |  | /* permit persons to whom the Software is furnished to do so, subject to */ | 
					
						
							|  |  |  | /* the following conditions:                                             */ | 
					
						
							|  |  |  | /*                                                                       */ | 
					
						
							|  |  |  | /* The above copyright notice and this permission notice shall be        */ | 
					
						
							|  |  |  | /* included in all copies or substantial portions of the Software.       */ | 
					
						
							|  |  |  | /*                                                                       */ | 
					
						
							|  |  |  | /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */ | 
					
						
							|  |  |  | /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */ | 
					
						
							|  |  |  | /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ | 
					
						
							|  |  |  | /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */ | 
					
						
							|  |  |  | /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */ | 
					
						
							|  |  |  | /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */ | 
					
						
							|  |  |  | /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */ | 
					
						
							|  |  |  | /*************************************************************************/ | 
					
						
							| 
									
										
										
										
											2018-01-05 00:50:27 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | #ifndef ERROR_LIST_H
 | 
					
						
							|  |  |  | #define ERROR_LIST_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** Error List. Please never compare an error against FAILED
 | 
					
						
							|  |  |  |  * Either do result != OK , or !result. This way, Error fail | 
					
						
							|  |  |  |  * values can be more detailed in the future. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This is a generic error list, mainly for organizing a language of returning errors. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum Error { | 
					
						
							| 
									
										
										
										
											2019-06-27 12:35:55 +02:00
										 |  |  | 	OK, // (0)
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	FAILED, ///< Generic fail error
 | 
					
						
							|  |  |  | 	ERR_UNAVAILABLE, ///< What is requested is unsupported/unavailable
 | 
					
						
							| 
									
										
										
										
											2017-03-24 21:45:31 +01:00
										 |  |  | 	ERR_UNCONFIGURED, ///< The object being used hasn't been properly set up yet
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_UNAUTHORIZED, ///< Missing credentials for requested resource
 | 
					
						
							|  |  |  | 	ERR_PARAMETER_RANGE_ERROR, ///< Parameter given out of range (5)
 | 
					
						
							|  |  |  | 	ERR_OUT_OF_MEMORY, ///< Out of memory
 | 
					
						
							|  |  |  | 	ERR_FILE_NOT_FOUND, | 
					
						
							|  |  |  | 	ERR_FILE_BAD_DRIVE, | 
					
						
							|  |  |  | 	ERR_FILE_BAD_PATH, | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ERR_FILE_NO_PERMISSION, // (10)
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_FILE_ALREADY_IN_USE, | 
					
						
							|  |  |  | 	ERR_FILE_CANT_OPEN, | 
					
						
							|  |  |  | 	ERR_FILE_CANT_WRITE, | 
					
						
							|  |  |  | 	ERR_FILE_CANT_READ, | 
					
						
							|  |  |  | 	ERR_FILE_UNRECOGNIZED, // (15)
 | 
					
						
							|  |  |  | 	ERR_FILE_CORRUPT, | 
					
						
							| 
									
										
										
										
											2015-08-23 20:15:56 -03:00
										 |  |  | 	ERR_FILE_MISSING_DEPENDENCIES, | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_FILE_EOF, | 
					
						
							|  |  |  | 	ERR_CANT_OPEN, ///< Can't open a resource/socket/file
 | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ERR_CANT_CREATE, // (20)
 | 
					
						
							| 
									
										
										
										
											2017-02-02 21:15:47 +09:00
										 |  |  | 	ERR_QUERY_FAILED, | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_ALREADY_IN_USE, | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ERR_LOCKED, ///< resource is locked
 | 
					
						
							|  |  |  | 	ERR_TIMEOUT, | 
					
						
							|  |  |  | 	ERR_CANT_CONNECT, // (25)
 | 
					
						
							| 
									
										
										
										
											2016-11-04 00:57:34 +09:00
										 |  |  | 	ERR_CANT_RESOLVE, | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_CONNECTION_ERROR, | 
					
						
							| 
									
										
										
										
											2017-09-21 23:58:29 -04:00
										 |  |  | 	ERR_CANT_ACQUIRE_RESOURCE, | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_CANT_FORK, | 
					
						
							| 
									
										
										
										
											2019-06-27 12:35:55 +02:00
										 |  |  | 	ERR_INVALID_DATA, ///< Data passed is invalid (30)
 | 
					
						
							| 
									
										
										
										
											2016-11-04 00:57:34 +09:00
										 |  |  | 	ERR_INVALID_PARAMETER, ///< Parameter passed is invalid
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_ALREADY_EXISTS, ///< When adding, item already exists
 | 
					
						
							| 
									
										
										
										
											2019-06-27 12:35:55 +02:00
										 |  |  | 	ERR_DOES_NOT_EXIST, ///< When retrieving/erasing, if item does not exist
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_DATABASE_CANT_READ, ///< database is full
 | 
					
						
							| 
									
										
										
										
											2019-06-27 12:35:55 +02:00
										 |  |  | 	ERR_DATABASE_CANT_WRITE, ///< database is full (35)
 | 
					
						
							| 
									
										
										
										
											2016-11-04 00:57:34 +09:00
										 |  |  | 	ERR_COMPILATION_FAILED, | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ERR_METHOD_NOT_FOUND, | 
					
						
							|  |  |  | 	ERR_LINK_FAILED, | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_SCRIPT_FAILED, | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ERR_CYCLIC_LINK, // (40)
 | 
					
						
							| 
									
										
										
										
											2016-11-04 00:57:34 +09:00
										 |  |  | 	ERR_INVALID_DECLARATION, | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_DUPLICATE_SYMBOL, | 
					
						
							|  |  |  | 	ERR_PARSE_ERROR, | 
					
						
							|  |  |  | 	ERR_BUSY, | 
					
						
							| 
									
										
										
										
											2017-03-05 16:44:50 +01:00
										 |  |  | 	ERR_SKIP, // (45)
 | 
					
						
							| 
									
										
										
										
											2016-11-04 00:57:34 +09:00
										 |  |  | 	ERR_HELP, ///< user requested help!!
 | 
					
						
							| 
									
										
										
										
											2014-02-09 22:10:30 -03:00
										 |  |  | 	ERR_BUG, ///< a bug in the software certainly happened, due to a double check failing or unexpected behavior.
 | 
					
						
							|  |  |  | 	ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
 | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |