Trappable errors Cognos script

The following table lists the runtime errors which the CognosScript Language returns. These errors can be trapped by On Error. The Err function can be used to query the error code, and the Error function can be used to query the error text.

5 Illegal function call
6 Overflow
7 Out of memory
9 Subscript out of range
10 Duplicate definition
11 Division by zero
13 Type Mismatch
14 Out of string space
19 No Resume
20 Resume without error
28 Out of stack space
35 Sub or Function not defined
48 Error in loading DLL
52 Bad file name or number
53 File not found
54 Bad file mode
55 File already open
58 File already exists
61 Disk full
62 Input past end of file
63 Bad record number
64 Bad file name
68 Device unavailable
70 Permission denied
71 Disk not ready
74 Can't rename with different drive
75 Path/File access error
76 Path not found
91 Object variable set to Nothing
93 Invalid pattern
94 Illegal use of NULL
102 Command failed
429 Object creation failed
438 No such property or method
439 Argument type mismatch
440 Object error
901 Input buffer would be larger than 64K
902 Operating system error
903 External procedure not found
904 Global variable type mismatch
905 User-defined type mismatch
906 External procedure interface mismatch
907 Pushbutton required
908 Module has no MAIN
910 Dialog box not declared