bug 319384: Don't use unsigned objects for signed values. Also give the "can't convert to integer" error an exception type so that it can be caught. r=daumling@adobe.com sr=brendan

This commit is contained in:
mrbkap%gmail.com 2005-12-07 20:49:52 +00:00
Родитель f8c6f64a36
Коммит c1c671891e
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -114,7 +114,7 @@ MSG_DEF(JSMSG_BAD_INSTANCEOF_RHS, 31, 1, JSEXN_TYPEERR, "invalid 'instanceo
MSG_DEF(JSMSG_BAD_BYTECODE, 32, 1, JSEXN_INTERNALERR, "unimplemented JavaScript bytecode {0}") MSG_DEF(JSMSG_BAD_BYTECODE, 32, 1, JSEXN_INTERNALERR, "unimplemented JavaScript bytecode {0}")
MSG_DEF(JSMSG_BAD_RADIX, 33, 1, JSEXN_ERR, "illegal radix {0}") MSG_DEF(JSMSG_BAD_RADIX, 33, 1, JSEXN_ERR, "illegal radix {0}")
MSG_DEF(JSMSG_NAN, 34, 1, JSEXN_ERR, "{0} is not a number") MSG_DEF(JSMSG_NAN, 34, 1, JSEXN_ERR, "{0} is not a number")
MSG_DEF(JSMSG_CANT_CONVERT, 35, 1, JSEXN_NONE, "can't convert {0} to an integer") MSG_DEF(JSMSG_CANT_CONVERT, 35, 1, JSEXN_ERR, "can't convert {0} to an integer")
MSG_DEF(JSMSG_CYCLIC_VALUE, 36, 1, JSEXN_ERR, "cyclic {0} value") MSG_DEF(JSMSG_CYCLIC_VALUE, 36, 1, JSEXN_ERR, "cyclic {0} value")
MSG_DEF(JSMSG_PERMANENT, 37, 1, JSEXN_ERR, "{0} is permanent") MSG_DEF(JSMSG_PERMANENT, 37, 1, JSEXN_ERR, "{0} is permanent")
MSG_DEF(JSMSG_CANT_CONVERT_TO, 38, 2, JSEXN_TYPEERR, "can't convert {0} to {1}") MSG_DEF(JSMSG_CANT_CONVERT_TO, 38, 2, JSEXN_TYPEERR, "can't convert {0} to {1}")

Просмотреть файл

@ -567,7 +567,7 @@ typedef enum JSExnType {
typedef struct JSErrorFormatString { typedef struct JSErrorFormatString {
const char *format; /* the error message (may be UTF-8 if compiled with JS_STRINGS_ARE_UTF8) */ const char *format; /* the error message (may be UTF-8 if compiled with JS_STRINGS_ARE_UTF8) */
uint16 argCount; /* the number of arguments to convert in the error message */ uint16 argCount; /* the number of arguments to convert in the error message */
uint16 exnType; /* One of the JSExnType constants above */ int16 exnType; /* One of the JSExnType constants above */
} JSErrorFormatString; } JSErrorFormatString;
typedef const JSErrorFormatString * typedef const JSErrorFormatString *