## 3.14.23  Using LastError information
You can use the property LastError of the API method SAPGetProperty to get a more detailed error information when executing an Analysis API method or function. The error information contains a number and an English error text. Y ou can enter as second parameter Text or Number if only this information should be reurned. I you do not define the second parameter, both values will be returned.
In the table below, you find a list of all errors with number and text.
| Number                              | Text                                                                                                                                                       |
|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| General critical errors             | General critical errors                                                                                                                                    |
| 1                                   | A general error occurred.                                                                                                                                  |
| 2                                   | A general error occurred in one of the data sources. This is most probably an error in the backend system or in the communication with the backend system. |
| 3                                   | An error from a previous call is still unhandled.                                                                                                          |
| Errors on pre-execution checks      | Errors on pre-execution checks                                                                                                                             |
| 10                                  | The BI-Addin is disabled.                                                                                                                                  |
| 11                                  | At least one worksheet is protected.                                                                                                                       |
| 12                                  | Variable submit is paused.                                                                                                                                 |
| 13                                  | A callback is running.                                                                                                                                     |
| 14                                  | The command is not enabled.                                                                                                                                |
| 15                                  | Action is currently not allowed.                                                                                                                           |
| Parameter errors                    | Parameter errors                                                                                                                                           |
| 20                                  | A parameter is missing.                                                                                                                                    |
| 21                                  | A parameter has an invalid value.                                                                                                                          |
| Analysis object reference errors    | Analysis object reference errors                                                                                                                           |
| 30                                  | No active workbook application.                                                                                                                            |
| 31                                  | The specified data source is invalid. The alias may be wrong or the data source is not yet refreshed.                                                      |
| 32                                  | The alias cannot be resolved. This applies to macros where an alias may be a data source or a planning object.                                             |
| 33                                  | Variables are unmerged, data source alias needs to be specified.                                                                                           |
| 34                                  | No result set is available for the specified data source.                                                                                                  |
| 35                                  | At least one data source must have input variables.                                                                                                        |
| 36                                  | A data source was specified but variables are merged.                                                                                                      |
| 37                                  | At least one data source must be refreshed.                                                                                                                |
| Excel object reference errors       | Excel object reference errors                                                                                                                              |
| 40                                  | Invalid sheet reference.                                                                                                                                   |
| 41                                  | Invalid cell reference.                                                                                                                                    |
| General uncritical errors           | General uncritical errors                                                                                                                                  |
| 50                                  | A general error occurred.                                                                                                                                  |
| 51                                  | Logon failed.                                                                                                                                              |
| Errors dealing with selection state | Errors dealing with selection state                                                                                                                        |
| 60                                  | Single selection requested but multiple selection is applied.                                                                                              |
| Number                                     | Text                                                               |
|--------------------------------------------|--------------------------------------------------------------------|
| 61                                         | Multiple selection requested but only single selection is allowed. |
| Errors dealing with interface restrictions | Errors dealing with interface restrictions                         |
| 70                                         | Maximum string length is exceeded, texts are truncated.            |
## Example
Error Number 1
lResult= Application.Run("SAPGetProperty", "LastError", "Number")
If you execute this command, it returns '1'.
lResult= Application.Run("SAPGetProperty", "LastError", "Text")
If you execute this command, it returns the text 'A general error occurred'.
lResult= Application.Run("SAPGetProperty", "LastError")
If you execute this command, it returns an array with the members { "1", "A general error occurred"}.
## Related Information
SAPGetProperty [page 112]