github.com/ontio/ontology@v1.14.4/vm/neovm/errors/errors.go (about) 1 /* 2 * Copyright (C) 2018 The ontology Authors 3 * This file is part of The ontology library. 4 * 5 * The ontology is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * The ontology is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with The ontology. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 package errors 20 21 import "errors" 22 23 var ( 24 ERR_BAD_VALUE = errors.New("bad value") 25 ERR_BAD_TYPE = errors.New("bad type") 26 ERR_OVER_STACK_LEN = errors.New("the count over the stack length") 27 ERR_OVER_CODE_LEN = errors.New("the count over the code length") 28 ERR_INTEGER_UNDERFLOW = errors.New("integer underflow") 29 ERR_UNDER_STACK_LEN = errors.New("the count under the stack length") 30 ERR_FAULT = errors.New("the exeution meet fault") 31 ERR_NOT_SUPPORT_SERVICE = errors.New("the service is not registered") 32 ERR_NOT_SUPPORT_OPCODE = errors.New("does not support the operation code") 33 ERR_OVER_LIMIT_STACK = errors.New("the stack over max size") 34 ERR_INDEX_OUT_OF_BOUND = errors.New("the index out of bound") 35 ERR_OVER_MAX_ITEM_SIZE = errors.New("the item over max size") 36 ERR_OVER_MAX_ARRAY_SIZE = errors.New("the array over max size") 37 ERR_OVER_MAX_BIGINTEGER_SIZE = errors.New("the biginteger over max size 32bit") 38 ERR_OUT_OF_GAS = errors.New("out of gas") 39 ERR_NOT_ARRAY = errors.New("not array") 40 ERR_TABLE_IS_NIL = errors.New("table is nil") 41 ERR_SERVICE_IS_NIL = errors.New("service is nil") 42 ERR_DIV_MOD_BY_ZERO = errors.New("div or mod by zero") 43 ERR_SHIFT_BY_NEG = errors.New("shift by negtive value") 44 ERR_EXECUTION_CONTEXT_NIL = errors.New("execution context is nil") 45 ERR_CURRENT_CONTEXT_NIL = errors.New("current context is nil") 46 ERR_CALLING_CONTEXT_NIL = errors.New("calling context is nil") 47 ERR_ENTRY_CONTEXT_NIL = errors.New("entry context is nil") 48 ERR_APPEND_NOT_ARRAY = errors.New("append not array") 49 ERR_NOT_SUPPORT_TYPE = errors.New("not a supported type") 50 ERR_MAP_NOT_EXIST = errors.New("map not contain key") 51 ERR_NOT_MAP_KEY = errors.New("type cann't as map key") 52 ERR_REMOVE_NOT_SUPPORT = errors.New("type don't support remove") 53 ERR_HASKEY_NOT_SUPPORT = errors.New("array keys only support integer") 54 ERR_DCALL_OFFSET_ERROR = errors.New("DCALL offset is not right") 55 )