Skip to content

Commit 8907c84

Browse files
committed
Delete unused error message constants.
1 parent 51505b5 commit 8907c84

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/ErrorMessages.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ public abstract class ErrorMessages {
120120
public static final String CALLING_NATIVE_FUNC_EXPECTED_ARGS = "Calling native function %s expected %d arguments but got %d.";
121121
public static final String CALLING_NATIVE_FUNC_FAILED = "Calling native function %s failed: %m";
122122
public static final String DECODER_RETURNED_P_INSTEAD_OF_BYTES = "'%s' decoder returned '%p' instead of 'str'; use codecs.decode() to decode to arbitrary types";
123-
public static final String ENCODER_RETURNED_P_INSTEAD_OF_BYTES = "'%s' encoder returned '%p' instead of 'bytes'; use codecs.encode() to encode to arbitrary types";
124123
public static final String S_ENCODER_RETURNED_P_INSTEAD_OF_BYTES = "'%s' encoder returned '%p' instead of 'bytes'; use codecs.encode() to encode to arbitrary types";
125124
public static final String ENCODER_S_RETURNED_S_INSTEAD_OF_BYTES = "encoder %s returned %s instead of bytes; use codecs.encode() to encode to arbitrary types";
126125
public static final String DECODER_S_RETURNED_P_INSTEAD_OF_STR = "'%s' decoder returned '%p' instead of 'str'; use codecs.decode() to decode to arbitrary types";
@@ -169,7 +168,6 @@ public abstract class ErrorMessages {
169168
public static final String CANNOT_SPECIFY_C_WITH_C = "Cannot specify '%c' with '%c'.";
170169
public static final String CANNOT_USE_FD_AND_FOLLOW_SYMLINKS_TOGETHER = "%s: cannot use fd and follow_symlinks together";
171170
public static final String CANT_CONCAT_P_TO_S = "can't concat %p to %s";
172-
public static final String CANT_CONVERT_TO_FLOAT = "can't convert %s to float";
173171
public static final String CANT_CONVERT_TO_STR_EXPLICITELY = "Can't convert '%p' object to str implicitly";
174172
public static final String CANT_COMPARE = "Can't compare %p and %p";
175173
public static final String CANT_DELETE = "can't delete '%s'";
@@ -221,7 +219,6 @@ public abstract class ErrorMessages {
221219
public static final String DICT_CHANGED_DURING_COMPARISON = "dictionary changed during comparison operation";
222220
public static final String CHANGED_SIZE_DURING_ITERATION = "%s changed size during iteration";
223221
public static final String DICT_MUST_BE_SET_TO_DICT = "__dict__ must be set to a dictionary, not a '%p'";
224-
public static final String DICT_OF_P_OBJECTS_HAS_NO_ATTR = "'%p' dict of '%p' object has no attribute '__setitem__'";
225222
public static final String DICT_UPDATE_SEQ_ELEM_HAS_LENGTH_2_REQUIRED = "dictionary update sequence element #%d has length %d; 2 is required";
226223
public static final String DIVISION_BY_ZERO = "division by zero";
227224
public static final String S_DIVISION_BY_ZERO = "%s division by zero";
@@ -282,9 +279,7 @@ public abstract class ErrorMessages {
282279
public static final String FORMATED_S_TOO_LONG = "formatted %s is too long (precision too large?)";
283280
public static final String FREE_VAR_REFERENCED_BEFORE_ASSIGMENT = "free variable '%s' referenced before assignment in enclosing scope";
284281
public static final String FUNC_CONSTRUCTION_NOT_SUPPORTED = "function construction not supported for (%p, %p, %p, %p, %p, %p)";
285-
public static final String FUNC_TAKES_AT_LEAST_D_ARGS = "function takes at least %d arguments (%d given)";
286282
public static final String FUNC_TAKES_EXACTLY_D_ARGS = "function takes exaclty %d arguments (%d given)";
287-
public static final String FUNC_S_MUST_BE_S_NOT_P = "%s() %s must be %s, not %p";
288283
public static final String GENERATOR_EXPR_MUST_BE_PARENTHESIZED = "Generator expression must be parenthesized";
289284
public static final String GENERATOR_IGNORED_EXIT = "generator ignored GeneratorExit";
290285
public static final String GENERATOR_RAISED_STOPITER = "generator raised StopIteration";
@@ -312,26 +307,22 @@ public abstract class ErrorMessages {
312307
public static final String INVALID_INDEXING_OF_0_DIM_MEMORY = "invalid indexing of 0-dim memory";
313308
public static final String ILLEGAL_ENVIRONMENT_VARIABLE_NAME = "illegal environment variable name";
314309
public static final String ILLEGAL_EXPRESSION_FOR_AUGMENTED_ASSIGNEMNT = "illegal expression for augmented assignment";
315-
public static final String ILLEGAL_IP_STRING_PASSED_TO = "illegal IP address string passed to %s";
316310
public static final String ILLEGAL_SOCKET_ADDR_ARG = "%s: illegal sockaddr argument";
317311
public static final String S_ILLEGAL_TIME_TUPLE_ARG = "%s: illegal time tuple argument";
318312
public static final String IMPORT_STAR_ONLY_ALLOWED_AT_MODULE_LEVEL = "import * only allowed at module level";
319313
public static final String INCOMPLETE_FORMAT = "incomplete format";
320-
public static final String INDEX_NOT_INT = "%s: index not int";
321314
public static final String INDEX_OUT_OF_BOUNDS = "index out of bounds";
322315
public static final String INDEX_OUT_OF_BOUNDS_ON_DIMENSION_D = "index out of bounds on dimension %d";
323316
public static final String INDEX_OUT_OF_RANGE = "index out of range";
324317
public static final String INDEX_RETURNED_NON_INT = "__index__ returned non-int (type %p)";
325318
public static final String INPUT_TOO_LONG = "input too long";
326319
public static final String INSTANCE_EX_MAY_NOT_HAVE_SEP_VALUE = "instance exception may not have a separate value";
327-
public static final String INSTANCE_HAS_NO_ATTR_S = "%s instance has no attribute '%s'";
328320
public static final String INT_CANT_CONVERT_STRING_WITH_EXPL_BASE = "int() can't convert non-string with explicit base";
329321
public static final String INT_TOO_LARGE_TO_CONVERT_TO_FLOAT = "int too large to convert to float";
330322
public static final String INTEGER_DIVISION_BY_ZERO = "ZeroDivisionError: integer division or modulo by zero";
331323
public static final String INTEGER_DIVISION_RESULT_TOO_LARGE = "integer division result too large for a float";
332324
public static final String S_EXPECTED_GOT_P = "%s argument expected, got %p";
333325
public static final String REC_LIMIT_GREATER_THAN_1 = "recursion limit must be greater or equal than 1";
334-
public static final String INTEGER_GREATER_THAN_MAX = "integer is greater than maximum";
335326
public static final String INTEGER_REQUIRED = "an integer is required";
336327
public static final String INTEGER_REQUIRED_GOT = "an integer is required (got type %p)";
337328
public static final String INTERMEDIATE_OVERFLOW_IN = "intermediate overflow in %s";
@@ -350,7 +341,6 @@ public abstract class ErrorMessages {
350341
public static final String INVALID_FILTER = "Invalid filter ID: %d";
351342
public static final String INVALID_FILTER_CHAIN_FOR_FORMAT = "Invalid filter chain for FORMAT_ALONE - must be a single LZMA1 filter";
352343
public static final String INVALID_INDEX_S = "invalid index %s";
353-
public static final String INVALID_INPUT_ELEM_TYPE = "Invalid input element type '%p'";
354344
public static final String INVALID_INSTANTIATION_OF_FOREIGN_OBJ = "invalid instantiation of foreign object";
355345
public static final String INVALID_ITEM_RETURNED_FROM_NATIVE_SEQ = "Invalid item type %s returned from native sequence storage (expected: %s)";
356346
public static final String INVALID_LITERAL_FOR_INT_WITH_BASE = "invalid literal for int() with base %s: %s";
@@ -390,7 +380,6 @@ public abstract class ErrorMessages {
390380
public static final String ITER_V_MUST_BE_CALLABLE = "iter(v, w): v must be callable";
391381
public static final String KEYWORD_NAMES_MUST_BE_STR_GOT_P = "keyword names must be str, get %p";
392382
public static final String KEYWORDS_S_MUST_BE_STRINGS = "%s() keywords must be strings";
393-
public static final String KEYWORDS_MUST_BE_STRINGS = "keywords must be strings";
394383
public static final String KLASS_ARG_IS_NOT_HOST_OBJ = "klass argument '%p' is not a host object";
395384
public static final String LAZY_INITIALIZATION_FAILED = "lazy initialization of type %s failed";
396385
public static final String LEFT_BRACKET_WO_RIGHT_BRACKET_IN_ARG = "')' without '(' in argument parsing";
@@ -457,9 +446,7 @@ public abstract class ErrorMessages {
457446
public static final String MUST_BE_TUPLE_OF_CLASSES_NOT_P = "%s.%s must be tuple of classes, not '%p'";
458447
public static final String MUST_RETURN_2TUPLE = "%p.__divmod__() must return a 2-tuple, not %p";
459448
public static final String S_MUST_RETURN_TUPLE = "%s must return a tuple (object, integer)";
460-
public static final String MUST_S_ITER_RETURN_2TUPLE = "%s iterator must return 2-tuples";
461449
public static final String S_MUST_RETURN_S_NOT_P = "%s must return a %s, not %p";
462-
public static final String S_MUST_RETURN_S_OR_S = "%s must return a %s or %s";
463450
public static final String MUTATED_DURING_UPDATE = "%s mutated during update";
464451
public static final String NAME_IS_USED_BEFORE_GLOBAL = "name '%s' is used prior to global declaration";
465452
public static final String NAME_IS_ASSIGNED_BEFORE_GLOBAL = "name '%s' is assigned to before global declaration";
@@ -517,15 +504,12 @@ public abstract class ErrorMessages {
517504
public static final String ONLY_S_AND_S_AMY_FOLLOW_S = "Only %s and %s may follow %s";
518505
public static final String ORDER_MUST_BE_C_F_OR_A = "order must be 'C', 'F' or 'A'";
519506
public static final String PATH_SHOULD_BE_STR_BYTES_PATHLIKE_NOT_P = "path should be string, bytes, or os.PathLike, not %p";
520-
public static final String PACKED_IP_WRONG_LENGTH = "packed IP wrong length for %s";
521-
public static final String PACKET_IP_WRONG_LENGTH_FOR = "packed IP wrong length for %s";
522507
public static final String PATCHED_DATETIME_CLASS = "patched datetime class: %r";
523508
public static final String POLYGLOT_ACCESS_NOT_ALLOWED = "polyglot access is not allowed";
524509
public static final String POLYGLOT_EVAL_MUST_PASS_STRINGS = "polyglot.eval must pass strings as either 'path' or a 'string' keyword";
525510
public static final String POLYGLOT_EVAL_WITH_STRING_MUST_PASS_LANG = "polyglot.eval with a string argument must pass a language or mime-type";
526511
public static final String POP_FROM_EMPTY_SET = "pop from an emtpy set";
527512
public static final String POP_INDEX_OUT_OF_RANGE = "pop index out of range";
528-
public static final String PORT_PROTO_NOT_FOUND = "port/proto not found";
529513
public static final String PRIVATE_IDENTIFIER_TOO_LARGE_TO_BE_MANGLED = "private identifier too large to be mangled";
530514
public static final String PROVIDED_OBJ_NOT_ARRAY = "provided object is not an array";
531515
public static final String PYTHON_INT_TOO_LARGE_TO_CONV_TO = "Python int too large to convert to %s";
@@ -544,7 +528,6 @@ public abstract class ErrorMessages {
544528
public static final String S_FORMAT_INTEGER_IS_REQUIRED_NOT_S = "%%%s format: an integer is required, not %p";
545529
public static final String C_ARG_NOT_IN_RANGE256_DECIMAL = "%%c arg not in range(256)";
546530
public static final String C_REQUIRES_INT_IN_BYTE_RANGE_OR_SINGLE_BYTE = "%%c requires an integer in range(256) or a single byte";
547-
public static final String REQUIRES_OBJ_THAT_IMPLEMENTS_S = " %%r requires an object that implements %s";
548531
public static final String REQUIRES_STRING_AS_LEFT_OPERAND = "'in <string>' requires string as left operand, not %P";
549532
public static final String REQUIRES_STR_OBJECT_BUT_RECEIVED_P = "'%s' requires a 'str' object but received a '%p'";
550533
public static final String RETURN_OUTSIDE_FUNC = "'return' outside function";
@@ -624,7 +607,6 @@ public abstract class ErrorMessages {
624607
public static final String TAKES_FROM_D_TO_D_POS_ARG_S_BUT_D_POS_ARG_S = "%s() takes from %d to %d positional argument%s but %d positional argument%s (and %d keyword-only argument%s) were given%s";
625608
public static final String TAKES_FROM_D_TO_D_POS_ARG_S_BUT_D_S_GIVEN_S = "%s() takes from %d to %d positional argument%s but %d %s given%s";
626609
public static final String TAKES_EXACTLY_D_ARGUMENTS_D_GIVEN = "%s() takes exactly %d arguments (%d given)";
627-
public static final String TAKES_EXACTLY_S_ARGUMENTS_D_GIVEN = "%s() takes exactly %s arguments (%d given)";
628610
public static final String TAKES_NO_KEYWORD_ARGS = "%s takes no keyword arguments";
629611
public static final String THROW_THIRD_ARG_MUST_BE_TRACEBACK = "throw() third argument must be a traceback object";
630612
public static final String TDATAOBJECT_SHOULD_NOT_HAVE_MORE_LINKS = "_tee_dataobject should not have more than %s links";
@@ -660,7 +642,6 @@ public abstract class ErrorMessages {
660642
public static final String UNHASHABLE_TYPE_P = "unhashable type: '%p'";
661643
public static final String UNHASHABLE_TYPE = "unhashable type";
662644
public static final String UNINITIALIZED_S_OBJECT = "uninitialized classmethod object";
663-
public static final String UNKNOWN_ADDR_FAMILY = "unknown address family %d";
664645
public static final String UNKNOWN_ATTR = "Unknown attribute: '%s'";
665646
public static final String UNKNOWN_ENCODING = "unknown encoding %s";
666647
public static final String UNKNOWN_ERROR_HANDLER = "unknown error handler name '%s'";
@@ -687,7 +668,6 @@ public abstract class ErrorMessages {
687668
public static final String UNSUPPORTED_USE_OF_SYS_EXECUTABLE = "internal error: unsupported use of sys.executable";
688669
public static final String UTIME_CANNOT_USE_DIR_FD_AND_FOLLOW_SYMLINKS = "utime: cannot use dir_fd and follow_symlinks together on this platform";
689670
public static final String VALUE_TOO_LARGE_TO_FIT_INTO_INDEX = "value too large to fit into index-sized integer";
690-
public static final String WAS_NOT_POSSIBLE_TO_MARSHAL = "Was not possible to marshal";
691671
public static final String WAS_NOT_POSSIBLE_TO_MARSHAL_P = "Was not possible to marshal %p";
692672
public static final String WEAK_OBJ_GONE_AWAY = "weak object has gone away";
693673
public static final String X_NOT_IN_LIST = "x not in list";
@@ -871,7 +851,6 @@ public abstract class ErrorMessages {
871851
public static final String ILLEGAL_STATE_ARGUMENT = "illegal state argument";
872852
public static final String STATE_ARGUMENT_MUST_BE_A_TUPLE = "state argument must be a tuple";
873853
public static final String STATE_ARGUMENT_D_MUST_BE_A_S = "state argument %d must be a %s";
874-
public static final String REENTRANT_CALL_INSIDE_S_REPR = "reentrant call inside %s.__repr__";
875854
public static final String EXISTING_EXPORTS_OF_DATA_OBJECT_CANNOT_BE_RE_SIZED = "Existing exports of data: object cannot be re-sized";
876855
public static final String SECOND_ITEM_OF_STATE_MUST_BE_AN_INTEGER_NOT_P = "second item of state must be an integer, not %p";
877856
public static final String WRITE_COULD_NOT_COMPLETE_WITHOUT_BLOCKING = "write could not complete without blocking";
@@ -881,7 +860,6 @@ public abstract class ErrorMessages {
881860
public static final String DEQUE_MUTATED_DURING_ITERATION = "deque mutated during iteration";
882861
public static final String DEQUE_INDEX_OUT_OF_RANGE = "deque index out of range";
883862
public static final String CAN_ONLY_CONCATENATE_DEQUE_NOT_P_TO_DEQUE = "can only concatenate deque (not \"%p\") to deque";
884-
public static final String MULTI_PHASE_INIT_OF_EXTENSION_MODULE_S = "multi-phase init of extension module %s";
885863
public static final String INIT_S_RETURNED_AN_UNEXPECTED_VALUE = "HPyInit_%s returned an unexpected value (expected a Python module).";
886864

887865
// ctypes
@@ -924,7 +902,6 @@ public abstract class ErrorMessages {
924902
public static final String ARGUMENT_D = "argument %d: ";
925903
public static final String FFI_CALL_FAILED = "ffi_call failed";
926904
public static final String FFI_PREP_CIF_FAILED = "ffi_prep_cif failed";
927-
public static final String NO_FFI_TYPE_FOR_RESULT = "No ffi_type for result";
928905
public static final String INT_TOO_LONG_TO_CONVERT = "int too long to convert";
929906
public static final String CAST_ARGUMENT_2_MUST_BE_A_POINTER_TYPE_NOT_S = "cast() argument 2 must be a pointer type, not %s";
930907
public static final String WRONG_TYPE = "wrong type";
@@ -943,9 +920,6 @@ public abstract class ErrorMessages {
943920
public static final String OUT_PARAMETER_D_MUST_BE_A_POINTER_TYPE_NOT_S = "'out' parameter %d must be a pointer type, not %s";
944921
public static final String ARGUMENT_MUST_BE_CALLABLE_OR_INTEGER_FUNCTION_ADDRESS = "argument must be callable or integer function address";
945922
public static final String CANNOT_CONSTRUCT_INSTANCE_OF_THIS_CLASS_NO_ARGTYPES = "cannot construct instance of this class: no argtypes";
946-
public static final String INVALID_RESULT_TYPE_FOR_CALLBACK_FUNCTION = "invalid result type for callback function";
947-
public static final String FFI_PREP_CIF_FAILED_WITH_D = "ffi_prep_cif failed with %d";
948-
public static final String FFI_PREP_CLOSURE_FAILED_WITH_D = "ffi_prep_closure failed with %d";
949923
public static final String THE_ERRCHECK_ATTRIBUTE_MUST_BE_CALLABLE = "the errcheck attribute must be callable";
950924
public static final String RESTYPE_MUST_BE_A_TYPE_A_CALLABLE_OR_NONE = "restype must be a type, a callable, or None";
951925
public static final String THIS_FUNCTION_TAKES_AT_LEAST_D_ARGUMENT_S_D_GIVEN = "this function takes at least %d argument%s (%d given)";

0 commit comments

Comments
 (0)