According to basic/source/classes/sb.cxx,
{ 1, ERRCODE_BASIC_EXCEPTION },
{ 2, ERRCODE_BASIC_SYNTAX },
{ 3, ERRCODE_BASIC_NO_GOSUB },
{ 4, ERRCODE_BASIC_REDO_FROM_START },
{ 5, ERRCODE_BASIC_BAD_ARGUMENT },
{ 6, ERRCODE_BASIC_MATH_OVERFLOW },
{ 7, ERRCODE_BASIC_NO_MEMORY },
{ 8, ERRCODE_BASIC_ALREADY_DIM },
{ 9, ERRCODE_BASIC_OUT_OF_RANGE },
{ 10, ERRCODE_BASIC_DUPLICATE_DEF },
{ 11, ERRCODE_BASIC_ZERODIV },
{ 12, ERRCODE_BASIC_VAR_UNDEFINED },
{ 13, ERRCODE_BASIC_CONVERSION },
{ 14, ERRCODE_BASIC_BAD_PARAMETER },
{ 18, ERRCODE_BASIC_USER_ABORT },
{ 20, ERRCODE_BASIC_BAD_RESUME },
{ 28, ERRCODE_BASIC_STACK_OVERFLOW },
{ 35, ERRCODE_BASIC_PROC_UNDEFINED },
{ 48, ERRCODE_BASIC_BAD_DLL_LOAD },
{ 49, ERRCODE_BASIC_BAD_DLL_CALL },
{ 51, ERRCODE_BASIC_INTERNAL_ERROR },
{ 52, ERRCODE_BASIC_BAD_CHANNEL },
{ 53, ERRCODE_BASIC_FILE_NOT_FOUND },
{ 54, ERRCODE_BASIC_BAD_FILE_MODE },
{ 55, ERRCODE_BASIC_FILE_ALREADY_OPEN },
{ 57, ERRCODE_BASIC_IO_ERROR },
{ 58, ERRCODE_BASIC_FILE_EXISTS },
{ 59, ERRCODE_BASIC_BAD_RECORD_LENGTH },
{ 61, ERRCODE_BASIC_DISK_FULL },
{ 62, ERRCODE_BASIC_READ_PAST_EOF },
{ 63, ERRCODE_BASIC_BAD_RECORD_NUMBER },
{ 67, ERRCODE_BASIC_TOO_MANY_FILES },
{ 68, ERRCODE_BASIC_NO_DEVICE },
{ 70, ERRCODE_BASIC_ACCESS_DENIED },
{ 71, ERRCODE_BASIC_NOT_READY },
{ 73, ERRCODE_BASIC_NOT_IMPLEMENTED },
{ 74, ERRCODE_BASIC_DIFFERENT_DRIVE },
{ 75, ERRCODE_BASIC_ACCESS_ERROR },
{ 76, ERRCODE_BASIC_PATH_NOT_FOUND },
{ 91, ERRCODE_BASIC_NO_OBJECT },
{ 93, ERRCODE_BASIC_BAD_PATTERN },
{ 94, ERRCODE_BASIC_IS_NULL },
{ 250, ERRCODE_BASIC_DDE_ERROR },
{ 280, ERRCODE_BASIC_DDE_WAITINGACK },
{ 281, ERRCODE_BASIC_DDE_OUTOFCHANNELS },
{ 282, ERRCODE_BASIC_DDE_NO_RESPONSE },
{ 283, ERRCODE_BASIC_DDE_MULT_RESPONSES },
{ 284, ERRCODE_BASIC_DDE_CHANNEL_LOCKED },
{ 285, ERRCODE_BASIC_DDE_NOTPROCESSED },
{ 286, ERRCODE_BASIC_DDE_TIMEOUT },
{ 287, ERRCODE_BASIC_DDE_USER_INTERRUPT },
{ 288, ERRCODE_BASIC_DDE_BUSY },
{ 289, ERRCODE_BASIC_DDE_NO_DATA },
{ 290, ERRCODE_BASIC_DDE_WRONG_DATA_FORMAT },
{ 291, ERRCODE_BASIC_DDE_PARTNER_QUIT },
{ 292, ERRCODE_BASIC_DDE_CONV_CLOSED },
{ 293, ERRCODE_BASIC_DDE_NO_CHANNEL },
{ 294, ERRCODE_BASIC_DDE_INVALID_LINK },
{ 295, ERRCODE_BASIC_DDE_QUEUE_OVERFLOW },
{ 296, ERRCODE_BASIC_DDE_LINK_ALREADY_EST },
{ 297, ERRCODE_BASIC_DDE_LINK_INV_TOPIC },
{ 298, ERRCODE_BASIC_DDE_DLL_NOT_FOUND },
{ 323, ERRCODE_BASIC_CANNOT_LOAD },
{ 341, ERRCODE_BASIC_BAD_INDEX },
{ 366, ERRCODE_BASIC_NO_ACTIVE_OBJECT },
{ 380, ERRCODE_BASIC_BAD_PROP_VALUE },
{ 382, ERRCODE_BASIC_PROP_READONLY },
{ 394, ERRCODE_BASIC_PROP_WRITEONLY },
{ 420, ERRCODE_BASIC_INVALID_OBJECT },
{ 423, ERRCODE_BASIC_NO_METHOD },
{ 424, ERRCODE_BASIC_NEEDS_OBJECT },
{ 425, ERRCODE_BASIC_INVALID_USAGE_OBJECT },
{ 430, ERRCODE_BASIC_NO_OLE },
{ 438, ERRCODE_BASIC_BAD_METHOD },
{ 440, ERRCODE_BASIC_OLE_ERROR },
{ 445, ERRCODE_BASIC_BAD_ACTION },
{ 446, ERRCODE_BASIC_NO_NAMED_ARGS },
{ 447, ERRCODE_BASIC_BAD_LOCALE },
{ 448, ERRCODE_BASIC_NAMED_NOT_FOUND },
{ 449, ERRCODE_BASIC_NOT_OPTIONAL },
{ 450, ERRCODE_BASIC_WRONG_ARGS },
{ 451, ERRCODE_BASIC_NOT_A_COLL },
{ 452, ERRCODE_BASIC_BAD_ORDINAL },
{ 453, ERRCODE_BASIC_DLLPROC_NOT_FOUND },
{ 460, ERRCODE_BASIC_BAD_CLIPBD_FORMAT },
{ 951, ERRCODE_BASIC_UNEXPECTED },
{ 952, ERRCODE_BASIC_EXPECTED },
{ 953, ERRCODE_BASIC_SYMBOL_EXPECTED },
{ 954, ERRCODE_BASIC_VAR_EXPECTED },
{ 955, ERRCODE_BASIC_LABEL_EXPECTED },
{ 956, ERRCODE_BASIC_LVALUE_EXPECTED },
{ 957, ERRCODE_BASIC_VAR_DEFINED },
{ 958, ERRCODE_BASIC_PROC_DEFINED },
{ 959, ERRCODE_BASIC_LABEL_DEFINED },
{ 960, ERRCODE_BASIC_UNDEF_VAR },
{ 961, ERRCODE_BASIC_UNDEF_ARRAY },
{ 962, ERRCODE_BASIC_UNDEF_PROC },
{ 963, ERRCODE_BASIC_UNDEF_LABEL },
{ 964, ERRCODE_BASIC_UNDEF_TYPE },
{ 965, ERRCODE_BASIC_BAD_EXIT },
{ 966, ERRCODE_BASIC_BAD_BLOCK },
{ 967, ERRCODE_BASIC_BAD_BRACKETS },
{ 968, ERRCODE_BASIC_BAD_DECLARATION },
{ 969, ERRCODE_BASIC_BAD_PARAMETERS },
{ 970, ERRCODE_BASIC_BAD_CHAR_IN_NUMBER },
{ 971, ERRCODE_BASIC_MUST_HAVE_DIMS },
{ 972, ERRCODE_BASIC_NO_IF },
{ 973, ERRCODE_BASIC_NOT_IN_SUBR },
{ 974, ERRCODE_BASIC_NOT_IN_MAIN },
{ 975, ERRCODE_BASIC_WRONG_DIMS },
{ 976, ERRCODE_BASIC_BAD_OPTION },
{ 977, ERRCODE_BASIC_CONSTANT_REDECLARED },
{ 978, ERRCODE_BASIC_PROG_TOO_LARGE },
{ 979, ERRCODE_BASIC_NO_STRINGS_ARRAYS },
{ 1000, ERRCODE_BASIC_PROPERTY_NOT_FOUND },
{ 1001, ERRCODE_BASIC_METHOD_NOT_FOUND },
{ 1002, ERRCODE_BASIC_ARG_MISSING },
{ 1003, ERRCODE_BASIC_BAD_NUMBER_OF_ARGS },
{ 1004, ERRCODE_BASIC_METHOD_FAILED },
{ 1005, ERRCODE_BASIC_SETPROP_FAILED },
{ 1006, ERRCODE_BASIC_GETPROP_FAILED },
{ 1007, ERRCODE_BASIC_COMPAT },
{ 0xFFFF, ErrCode(0xFFFFFFFFUL) } // End mark
In addition (see StarBASIC::GetSfxFromVBError), when VBA is enabled, codes map like this:
1, 2, 4, 8, 12, 73: ERRCODE_NONE;
10: ERRCODE_BASIC_ARRAY_FIX;
14: ERRCODE_BASIC_STRING_OVERFLOW;
16: ERRCODE_BASIC_EXPR_TOO_COMPLEX;
17: ERRCODE_BASIC_OPER_NOT_PERFORM;
47: ERRCODE_BASIC_TOO_MANY_DLL;
92: ERRCODE_BASIC_LOOP_NOT_INIT;
(Errcodes are listed in include/basic/sberrors.hxx)