SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    <cftry> in head.cfm and </cftry> in foot.cfm

    Code:
    head.cfm
    
    <cftry>
    Code:
    index.cfm
    
    <cfinclude template='head.cfm'>
    
    index.cfm
    
    <cfinclude template='foot.cfm'>
    Code:
    foot.cfm
    
    </cftry>
    I have 3 cfm pages like the above.

    The index.cfm causes and Error, saying like the following.
    Context validation error for tag cftry.
    The start tag must have a matching end tag. This could be because <cfcatch> is not the last tag nested in the <cftry>. <cfcatch> must be the last tag inside a <cftry> tag.
    Should I always put the start tag and the end tag in a same page?

  2. #2
    SitePoint Evangelist
    Join Date
    Mar 2007
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot split the start and end tags between two pages. It is not allowed.

    Though IMO there is little point in wrapping the entire thing in a cftry/cfcatch anyway. That is what high level error handlers are for. To catch the unexpected.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •