ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Exception functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Retrieves information about the current exception.
This function can only be used in an exception process.
Caution: The values of ExceptionInfo are valid during the entire process code of exception.
Example
// Project initialization code
EXTERN "Except.WL"
// Load the constants for managing exceptions
PROCEDURE Value(sControlName)
WHEN EXCEPTION IN
RESULT(sControlName)
DO
IF ExceptionInfo(errCode) = UnknownExID THEN RESULT ""
END
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppUser code (UMC)Ajax
WHEN EXCEPTION IN
...
DO
// Full message of the main error
Trace(ExceptionInfo())
// Browse the sub-errors (if any)
FOR i = 1 TO ErrorInfo(errNumberSubError)
// Full message of each sub-error
Trace("Sub-error " + i + ": " + ExceptionInfo(errMessage, i))
END
END
Syntax

Finding out information about the last exception Hide the details

<Result> = ExceptionInfo([<Type of information>])
<Result>: Character string or integer
  • Requested information.
  • Empty string ("") if no error occurred or if the requested information is not available.
<Type of information>: Optional constant
Information to return.
errCodeError code
errDateTimeDate and time of error
WEBDEV - Browser codeAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJava This constant is not available.
errDotNetException.NET Exception object
WEBDEV - Browser codeAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJava This constant is not available.
errDuringName of the WLanguage function that threw the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errElementName of object associated with the current process when the error occurred
WEBDEV - Browser codeAndroidAndroid Widget Java Java class associated with the error.
errFICFull name of the data file (.FIC) associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errFileLogical name of the file associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errFullComponentNameFull name of the component being executed.
For example:
  • "" (empty string): main application context
  • "Component1": "Component1" component directly used in the project
  • "Component1.Component2": "Component2" component used from "Component1".
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is ignored.
errFullDetailsFull error details (error line, current process, etc.)
Remark: Returns the same information as the one retrieved via the "Copy" button in the WLanguage error window.
errInfoAdditional information
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errItemName of the item associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errLineNumber of the error line
errLinkName of the link associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errMessage
(by default)
Full error message
errMMOFull name of the memo file (.MMO) associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errNDXFull name of the index file (.NDX) associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errNumberSubErrorNumber of sub-errors for the error
WEBDEV - Browser codeAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJava This constant is not available.
errProcessName of process in progress when the error occurred
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errRecNumNumber of the record associated with the error
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errStackStack of WLanguage calls
WEBDEV - Browser codeAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJava This constant is not available.
errSummarySummary of error
errSystemCodeNumber of the system error (if it exists)
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errSystemMessageMessage of system error (if it exists)
WEBDEV - Browser codeAndroidAndroid Widget Java This constant is not available.
errWDDFull name of the WDD file associated with the error
WEBDEV - Browser codeAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystJava This constant is not available.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppUser code (UMC)Ajax

Finding out information about the sub-errors of last exception Hide the details

<Result> = ExceptionInfo([<Type of information>, ] <Sub-error subscript>)
<Result>: Character string or integer
  • Requested information.
  • Empty string ("") if no error occurred or if the requested information is not available.
<Type of information>: Optional constant
Information to return.
errCodeError code
errDateTimeDate and time of error
errDuringName of the WLanguage function that threw the error
errElementName of object associated with the current process when the error occurred
errFICFull name of the data file (.FIC) associated with the error
errFileLogical name of the file associated with the error
errFullDetailsFull error details (error line, current process, etc.)
Remark: Returns the same information as the one retrieved via the "Copy" button in the WLanguage error window.
errInfoAdditional information
errItemName of the item associated with the error
errLineNumber of the error line
errLinkName of the link associated with the error
errMessage
(by default)
Full error message
errMMOFull name of the memo file (.MMO) associated with the error
errNDXFull name of the index file (.NDX) associated with the error
errProcessName of process in progress when the error occurred
errRecNumNumber of the record associated with the error
errStackStack of WLanguage calls
errSummarySummary of error
errSystemCodeNumber of the system error (if it exists)
errSystemMessageMessage of system error (if it exists)
errWDDFull name of the WDD file associated with the error
<Sub-error subscript>: Integer
Index of sub-error to use.
Reminder: The number of sub-errors for an exception is returned by the errNumberSubError constant.
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
PROCEDURE evento_lista_objetos(ninstancia)
//variaiveis auxiliares
i is int = 1
objs_form is string = ""
sControlName is string = ""
sControles is string = ""

IF ninstancia = 0 THEN

RESULT ""

ELSE

NomeForm is string = m_Tabela[ninstancia].gs_nomeJanela

WHEN EXCEPTION IN

sControlName = EnumControl(NomeForm, i)

LOOP(5000)

// Process the control
Trace(sControlName)

// Next control
i++

sControlName = EnumControl(NomeForm, i)

IF sControlName <> "" AND sControlName <> Null AND sControlName <> 0 AND sControlName <> VK_EREOF
sControles += sControlName + "; "
ELSE
BREAK
END

END

RESULT sControles

DO
IF ExceptionInfo(errCode) THEN
RESULT sControles
END
END

END
Boller
02 Sep. 2023

Last update: 04/06/2023

Send a report | Local help