When should you use the <cfthrow> tag?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

When should you use the <cfthrow> tag?

Post 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply