1 /*--------------------------------------------------------------------------
2 * Copyright 2008 Taro L. Saito
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *--------------------------------------------------------------------------*/
16 //--------------------------------------
19 // StandardErrorCode.java
20 // Since: Oct 27, 2008 1:02:08 PM
24 //--------------------------------------
25 package org.xerial.core;
28 * Standard error codes
33 public enum XerialErrorCode implements ErrorCode {
35 // related to programming error
36 INVALID_STATE, SYNTAX_ERROR, NOT_INITIALIZED, UNSUPPORTED, INVALID_INPUT, INVALID_ARGUMENT, NOT_READY, INVALID_USAGE,
44 READ_ERROR, OUTPUT_ERROR, IO_EXCEPTION, INTERRUPTED,
46 // option parser error
47 DUPLICATE_OPTION, NO_OPTION, NO_USAGE_ANNOTATION, MISSING_ARGUMENT,
50 MISSING_TYPE_PARAMETER, NOT_A_COLLECTION, INACCESSIBLE_METHOD, WRONG_DATA_TYPE, DECODE_ERROR, ENCODE_ERROR,
53 INVALID_TOKEN, PARSE_ERROR,
56 INHERITED, HAS_AN_EXTENDED_ERROR_CODE,
59 // Bean specific error codes
65 InvalidXMLData, ParserError, UnsupportedXMLDataType,
68 InvalidJSONData, InvalidJSONArray,
73 InvalidBeanClass, IllegalArgument, IllegalAccess, NoPublicConstructor, InstantiationFailure, InvalidNumberFormat, InvocationTargetException,
78 GetterCannotBeUsedToBindData, BindFailure, UnknownBeanUpdator, InvalidKeyAndValuePair, MapContainerIsNotFound, MapElementConstructionFailed, InvalidDateFormat, InvalidFormat, InvalidType;
81 private final String description;
83 private XerialErrorCode() {
84 this.description = EMPTY_DESCRIPTION;
87 private XerialErrorCode(String description) {
88 this.description = description;
91 public String getCodeName() {
95 public String getDescription() {