PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Retrieving information about the exception
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Artificially triggers the security mechanism of WLanguage by throwing an exception. Then, this exception can be processed by an exception code written for this purpose. The exceptions are thrown in the WLanguage code only (and not in the framework).
Used in a Webservice, this function allows you to:
  • stop the current process,
  • return an error to the external application that uses the Webservice via the standard SOAP protocol.
    In the XML code returned by the Webservice, the error message is returned in the "faultstring" tag. The error number is not returned in a specific tag, it is contained in the text of the full error details found in the "detail" tag.
    Caution: When consuming this Webservice in a WINDEV, WEBDEV or WINDEV Mobile application, the error must be retrieved by ErrorInfo (and not by ExceptionInfo).
PHP Artificially triggers the PHP security mechanism by throwing an exception.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 19 and later
WEBDEV - Browser code This function is now available in Browser code.
New in version 19
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code This function is now available in Browser code.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget Windows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)
e
WHEN EXCEPTION
// According to the exception code
SWITCH ExceptionInfo(errCode)
// Process the exception 1
CASE 1: ...
// Process the exception 2
CASE 2: ...
END
END
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget Windows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)
// -- Click of Button1
// Throw an exception 1
ExceptionThrow(1)
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget Windows MobileUniversal Windows 10 AppJavaAjax
// -- Click of Button2
// Throw an exception 2
ExceptionThrow(2)
WEBDEV - Server codePHPAjax
// -- Click of Button1
// Throw a warning exception
ExceptionThrow(exceptionWarning)
Syntax
ExceptionThrow(<Error number> [, <Message>])
<Error number>: Integer or constant
Number of the error to throw. This number (included between 1 and 1000) is defined by the developer.
PHP Level of the error to throw:
exceptionWarningWarning exception
exceptionErrorError exception
exceptionInformationInformation exception
<Message>: Optional character string (with quotes)
Message associated with the error.
Remarks
WINDEVWEBDEV - Server codeWEBDEV - Browser codeReports and QueriesAndroidAndroid Widget iPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaAjaxUser code (UMC)

Retrieving information about the exception

The information about the exception is retrieved by ExceptionInfo:
  • ExceptionInfo(errCode) is used to retrieve the number of the exception.
  • ExceptionInfo(errMessage) is used to retrieve the message.
Component : wd250vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment