Page 1 of 1

When should you use the <cfthrow> tag?

Posted: Thu Mar 17, 2022 12:17 pm
by answerhappygod
When should you use the <cfthrow> tag?
A. to consistently handle exceptions in the Application.cfc onError method
B. to throw a message into the JMS message queue for processing
C. to write a diagnostic message to the error.log file
D. to consistently handle all syntax errors throughout your application


Answer : A



Given the following code:
<cferror type="validation" template="handler.cfm"/>
<cfform>
Enter a value:
<cfinput type="text" required="true" name="myinput" validateat="onServer" />
<cfinput type="submit" value="submit" name="submit" />
</cfform>
What happens when the form is submitted and validation rules are broken?
A. The file handler.cfm page is displayed.
B. The ColdFusion default validation error handler page is displayed.
C. The form page is displayed.
D. A runtime error occurs.


Answer : B



You want to display a custom template when an exception occurs in your application.
Which tag should you use to specify the template to be displayed?
A. <cfthrow />
B. <cfcatch />
C. <cferror />
D. <cfexecute />


Answer : C



Which Web application development task is most likely to benefit from the use of CFML- based regular expressions?
A. database queries
B. string parsing
C. image manipulation
D. web services


Answer : B



Which statement about a regular expression is true?
A. It is a term used for common design patterns.
B. It is a method of discussing design with clients.
C. It allows developers to discuss code syntax.
D. It is a method of searching strings.


Answer : D