+++ /dev/null
-/*--------------------------------------------------------------------------\r
- * Copyright 2008 Taro L. Saito\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *--------------------------------------------------------------------------*/\r
-//--------------------------------------\r
-// XerialJ\r
-//\r
-// StandardErrorCode.java\r
-// Since: Oct 27, 2008 1:02:08 PM\r
-//\r
-// $URL: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core/src/main/java/org/xerial/core/XerialErrorCode.java $\r
-// $Author: leo $\r
-//--------------------------------------\r
-package org.xerial.core;\r
-\r
-/**\r
- * Standard error codes\r
- * \r
- * @author leo\r
- * \r
- */\r
-public enum XerialErrorCode implements ErrorCode {\r
-\r
- // related to programming error\r
- INVALID_STATE, SYNTAX_ERROR, NOT_INITIALIZED, UNSUPPORTED, INVALID_INPUT, INVALID_ARGUMENT, NOT_READY, INVALID_USAGE,\r
- // collection\r
- MISSING_ELEMENT,\r
-\r
- // resources \r
- RESOURCE_NOT_FOUND,\r
-\r
- // I/O\r
- READ_ERROR, OUTPUT_ERROR, IO_EXCEPTION, INTERRUPTED,\r
-\r
- // option parser error\r
- DUPLICATE_OPTION, NO_OPTION, NO_USAGE_ANNOTATION, MISSING_ARGUMENT,\r
-\r
- // type \r
- MISSING_TYPE_PARAMETER, NOT_A_COLLECTION, INACCESSIBLE_METHOD, WRONG_DATA_TYPE, DECODE_ERROR, ENCODE_ERROR,\r
-\r
- // parse error\r
- INVALID_TOKEN, PARSE_ERROR,\r
-\r
- // general exception\r
- INHERITED, HAS_AN_EXTENDED_ERROR_CODE,\r
-\r
- \r
- // Bean specific error codes\r
- IOError,\r
-\r
- NoMoreSubtree,\r
-\r
- // XML\r
- InvalidXMLData, ParserError, UnsupportedXMLDataType,\r
- \r
- // JSON\r
- InvalidJSONData, InvalidJSONArray,\r
-\r
- UnsupportedDataType,\r
-\r
- // Bean class\r
- InvalidBeanClass, IllegalArgument, IllegalAccess, NoPublicConstructor, InstantiationFailure, InvalidNumberFormat, InvocationTargetException,\r
-\r
- BeanObjectIsNull,\r
-\r
- // binder\r
- GetterCannotBeUsedToBindData, BindFailure, UnknownBeanUpdator, InvalidKeyAndValuePair, MapContainerIsNotFound, MapElementConstructionFailed, InvalidDateFormat, InvalidFormat, InvalidType;\r
- ;\r
-\r
- private final String description;\r
-\r
- private XerialErrorCode() {\r
- this.description = EMPTY_DESCRIPTION;\r
- }\r
-\r
- private XerialErrorCode(String description) {\r
- this.description = description;\r
- }\r
-\r
- public String getCodeName() {\r
- return name();\r
- }\r
-\r
- public String getDescription() {\r
- return null;\r
- }\r
-\r
-}\r