Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Application Methods > RaiseErrorText MethodThe RaiseErrorText method raises a scripting error message to the browser. The error text is the specified literal string. The optional arguments are used to format the string if it contains any substitution arguments (%1, %2). SyntaxApplication.RaiseErrorText(value, [arg1], [arg2],...., [argN])
ReturnsUsageWhen invoked, the RaiseErrorText method stops execution of the script. Therefore, CancelOperation is not required after RaiseErrorText. Internally, the RaiseError and RaiseErrorText methods raise a Server Script exception. Therefore, if you have implemented error handling in your scripts, the error handling can suppress RaiseError and RaiseErrorText functionality. If you have implemented error handling in Siebel VB and are using "On Error Goto ...", the RaiseError and RaiseErrorText methods result in the script transferring execution to the error handler. "On Error Resume Next" suppresses the RaiseError and RaiseErrorText methods. NOTE: Do not use the %s and %n formatting literals with the RaiseErrorText method. This causes unpredictable results. CAUTION: Be careful when using RaiseErrorText, because it cancels operations. For example, if it is used in BusComp_PreWriteRecord, the user or code will not be able to step off the current record until the condition causing the RaiseErrorText method to be invoked is addressed. Used WithExampleIn the following eScript example, the RaiseErrorText results in a scripting exception being raised, transferring control to the catch statement. For the error message to be displayed, the error must be thrown, using the throw statement. function BusComp_PreDeleteRecord () The following eScript example raises an error when deleting an opportunity with the "Pipeline" revenue class. function BusComp_PreDeleteRecord () |
Siebel Object Interfaces Reference | Copyright © 2008, Oracle. All rights reserved. | |