Fixing Compiler Exceptions - Exercise

Contact Us or call 1-877-932-8228
Fixing Compiler Exceptions - Exercise

Fixing Compiler Exceptions

Duration: 10 to 15 minutes.

In this exercise, you will fix a compiler exception similar to the one we just saw. Your goal is to get the output to read "You have fixed the error!"

  1. Open Errors/Exercises/CompilerException.cfm in your editor and save it as CompilerException2.cfm.
  2. Fix it. If you get messed up, you can recopy the original Errors/Exercises/CompilerException.cfm.
  3. To test your solution, open Errors/Exercises/CompilerException2.cfm in your browser.

Solution:

Errors/Solutions/CompilerException.cfm
<cfif true>
	You <!---Yes--->
	<cfif true>
		<cfif true>
			have <!---Yes--->
			<cfif true>
				fixed <!---Yes--->
				<cfif false>
					<cfif true>
						some <!---No--->
					</cfif>
					<cfif true>
						of <!---No--->
					</cfif>
				</cfif>
				the <!---Yes--->
			</cfif>
		</cfif>
		error! <!---Yes--->
	</cfif>
</cfif>
Next