github.com/mithrandie/csvq@v1.18.1/lib/query/error_code.go (about)

     1  package query
     2  
     3  const returnCodeBaseSignal = 128
     4  const errorSignalBase = 91280
     5  
     6  const (
     7  	ReturnCodeApplicationError          = 1
     8  	ReturnCodeIncorrectUsage            = 2
     9  	ReturnCodeSyntaxError               = 4
    10  	ReturnCodeContextDone               = 8
    11  	ReturnCodeIOError                   = 16
    12  	ReturnCodeSystemError               = 32
    13  	ReturnCodeDefaultUserTriggeredError = 64
    14  )
    15  
    16  const (
    17  	//Application Error
    18  	ErrorFatal                                = 1
    19  	ErrorCannotDetectFileEncoding             = 10001
    20  	ErrorFieldAmbiguous                       = 10101
    21  	ErrorFieldNotExist                        = 10102
    22  	ErrorFieldNotGroupKey                     = 10103
    23  	ErrorDuplicateFieldName                   = 10104
    24  	ErrorNotGroupingRecords                   = 10201
    25  	ErrorNotAllowedAnalyticFunction           = 10202
    26  	ErrorUndeclaredVariable                   = 10301
    27  	ErrorVariableRedeclared                   = 10302
    28  	ErrorUndefinedConstant                    = 10321
    29  	ErrorInvalidUrl                           = 10341
    30  	ErrorUnsupportedUrlScheme                 = 10342
    31  	ErrorFunctionNotExist                     = 10401
    32  	ErrorFunctionArgumentsLength              = 10402
    33  	ErrorFunctionInvalidArgument              = 10403
    34  	ErrorFunctionRedeclared                   = 10501
    35  	ErrorBuiltInFunctionDeclared              = 10502
    36  	ErrorDuplicateParameter                   = 10503
    37  	ErrorSubqueryTooManyRecords               = 10601
    38  	ErrorSubqueryTooManyFields                = 10602
    39  	ErrorJsonQueryTooManyRecords              = 10701
    40  	ErrorLoadJson                             = 10702
    41  	ErrorEmptyJsonQuery                       = 10703 // Not in use after v1.14.0
    42  	ErrorJsonLinesStructure                   = 10704
    43  	ErrorEmptyJsonTable                       = 10801 // Not in use after v1.14.0
    44  	ErrorIncorrectLateralUsage                = 10802
    45  	ErrorEmptyInlineTable                     = 10803
    46  	ErrorInvalidTableObject                   = 10901
    47  	ErrorTableObjectInvalidDelimiter          = 10902
    48  	ErrorTableObjectInvalidDelimiterPositions = 10903
    49  	ErrorTableObjectInvalidJsonQuery          = 10904
    50  	ErrorTableObjectArgumentsLength           = 10905
    51  	ErrorTableObjectJsonArgumentsLength       = 10906
    52  	ErrorTableObjectInvalidArgument           = 10907
    53  	ErrorCursorRedeclared                     = 11001
    54  	ErrorUndeclaredCursor                     = 11002
    55  	ErrorCursorClosed                         = 11003
    56  	ErrorCursorOpen                           = 11004
    57  	ErrorInvalidCursorStatement               = 11005
    58  	ErrorPseudoCursor                         = 11006
    59  	ErrorCursorFetchLength                    = 11007
    60  	ErrorInvalidFetchPosition                 = 11008
    61  	ErrorInlineTableRedefined                 = 11101
    62  	ErrorUndefinedInlineTable                 = 11102
    63  	ErrorInlineTableFieldLength               = 11103
    64  	ErrorFileNameAmbiguous                    = 11201
    65  	ErrorDataParsing                          = 11301
    66  	ErrorDataEncoding                         = 11351
    67  	ErrorTableFieldLength                     = 11401
    68  	ErrorTemporaryTableRedeclared             = 11501
    69  	ErrorUndeclaredTemporaryTable             = 11502
    70  	ErrorTemporaryTableFieldLength            = 11503
    71  	ErrorDuplicateTableName                   = 11601
    72  	ErrorTableNotLoaded                       = 11602
    73  	ErrorStdinEmpty                           = 11603
    74  	ErrorInlineTableCannotBeUpdated           = 11604
    75  	ErrorAliasMustBeSpecifiedForUpdate        = 11605
    76  	ErrorRowValueLengthInComparison           = 11701
    77  	ErrorFieldLengthInComparison              = 11702
    78  	ErrorInvalidLimitPercentage               = 11801
    79  	ErrorInvalidLimitNumber                   = 11802
    80  	ErrorInvalidOffsetNumber                  = 11901
    81  	ErrorCombinedSetFieldLength               = 12001
    82  	ErrorRecursionExceededLimit               = 12002
    83  	ErrorNestedRecursion                      = 12003
    84  	ErrorInsertRowValueLength                 = 12101
    85  	ErrorInsertSelectFieldLength              = 12102
    86  	ErrorUpdateFieldNotExist                  = 12201
    87  	ErrorUpdateValueAmbiguous                 = 12202
    88  	ErrorDeleteTableNotSpecified              = 12301
    89  	ErrorShowInvalidObjectType                = 12401
    90  	ErrorReplaceValueLength                   = 12501
    91  	ErrorSourceInvalidFilePath                = 12601
    92  	ErrorInvalidFlagName                      = 12701
    93  	ErrorFlagValueNowAllowedFormat            = 12702
    94  	ErrorInvalidFlagValue                     = 12703
    95  	ErrorAddFlagNotSupportedName              = 12801
    96  	ErrorRemoveFlagNotSupportedName           = 12802
    97  	ErrorInvalidFlagValueToBeRemoved          = 12803
    98  	ErrorInvalidRuntimeInformation            = 12901
    99  	ErrorNotTable                             = 13001
   100  	ErrorInvalidTableAttributeName            = 13002
   101  	ErrorTableAttributeValueNotAllowedFormat  = 13003
   102  	ErrorInvalidTableAttributeValue           = 13004
   103  	ErrorInvalidEventName                     = 13101
   104  	ErrorInternalRecordIdNotExist             = 13201
   105  	ErrorInternalRecordIdEmpty                = 13202
   106  	ErrorFieldLengthNotMatch                  = 13301
   107  	ErrorRowValueLengthInList                 = 13401
   108  	ErrorFormatStringLengthNotMatch           = 13501
   109  	ErrorUnknownFormatPlaceholder             = 13502
   110  	ErrorFormatUnexpectedTermination          = 13503
   111  	ErrorInvalidReloadType                    = 13601
   112  	ErrorLoadConfiguration                    = 13701
   113  	ErrorDuplicateStatementName               = 13801
   114  	ErrorStatementNotExist                    = 13802
   115  	ErrorStatementReplaceValueNotSpecified    = 13803
   116  	ErrorReplaceKeyNotSet                     = 13901
   117  	ErrorSelectIntoQueryFieldLengthNotMatch   = 14001
   118  	ErrorSelectIntoQueryTooManyRecords        = 14002
   119  	ErrorIntegerDevidedByZero                 = 30000
   120  
   121  	//Incorrect Command Usage
   122  	ErrorIncorrectCommandUsage = 90020
   123  
   124  	//Syntax Error
   125  	ErrorSyntaxError                  = 90040
   126  	ErrorInvalidValueExpression       = 90041
   127  	ErrorNestedAggregateFunctions     = 90042
   128  	ErrorPreparedStatementSyntaxError = 90043
   129  
   130  	//Context Error
   131  	ErrorContextDone     = 90080
   132  	ErrorContextCanceled = 90081
   133  	ErrorFileLockTimeout = 90082
   134  
   135  	//IO Error
   136  	ErrorIO               = 90160
   137  	ErrorCommit           = 90171
   138  	ErrorRollback         = 90172
   139  	ErrorInvalidPath      = 90180
   140  	ErrorFileNotExist     = 90181
   141  	ErrorFileAlreadyExist = 90182
   142  	ErrorFileUnableToRead = 90183
   143  
   144  	//System Error
   145  	ErrorSystemError      = 90320
   146  	ErrorExternalCommand  = 30330
   147  	ErrorHttpRequestError = 30400
   148  
   149  	//User Triggered Error
   150  	ErrorExit          = 90640
   151  	ErrorUserTriggered = 90650
   152  )