Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:08:43+00:00 2026-05-30T15:08:43+00:00

How does ColdFusion assign an error number/value to cfcatch.ErrNumber? I know I have to

  • 0

How does ColdFusion assign an error number/value to cfcatch.ErrNumber? I know I have to place it within a cftry/cfcatch tags. When an error is caught, I can use cfcatch.message or cfcatch.detail to see what happened but if I try to access cfcatch.ErrNumber, I get an error. How do you implement it? CFDOCS were of no use.

Not a big deal, just wondering.

<cftry>
<cfquery name='somequery' datasource='dsn'>
    select foo1, foo2, foo3
    from footable XXX
</cfquery>
<cfcatch type='any'>
    <cfoutput>#cfcatch.message#</cfquery>
</cftry>

The snippet above would come back and say something about table not found since I added the XXX after the table name. Where would cfcatch.ErrNumber come into play here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:08:44+00:00Added an answer on May 30, 2026 at 3:08 pm

    You aren’t seeing it because errNumber is only a valid attribute of cfcatch when the error is of type “expression”. From the docs:

    cfcatch.ErrNumber
    Applies to type = “expression”. Internal expression error number.

    So you would have to change your code to something like this:

    <cftry>
    <cfquery name='somequery' datasource='dsn'>
        select foo1, foo2, foo3
        from footable XXX
    </cfquery>
        <cfcatch type='expression'>
            <cfoutput>#cfcatch.errNumber#</cfoutput>
        </cfcatch>
        <cfcatch type='any'>
        <cfoutput>#cfcatch.message#</cfoutput>
        </cfcatch>
    </cftry>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know if it's possible to generate powerpoint ppts within ColdFusion? I can't
Does anyone know of a Webmail Contact List Importer scripts (ColdFusion, PHP etc) like
I have a ColdFusion script that does: <cfset content = replace(content,&##147;,,all)> Which replaces &147;
Does anyone know about this error I get when I try to insert a
Does Coldfusion have a Global structure where the expressions global[FORM] , global[URL] , global[APPLICATION]
Does anyone know of a way to add ColdFusion syntax highlighting to e-texteditor?
HI folks! i got a simple question for coldfusion users, does anyone know how
Does anyone know how to combine custom Javascript validation with the built in Coldfusion
Does ColdFusion automatically generate the basic HTML tags like: <HTML> <head></head> <body></body> </HTML> Or
Using ColdFusion 9.01, occasionally, we have observed an issue where an error may be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.