Skip to main content
Participant
April 24, 2008
Question

native error code

  • April 24, 2008
  • 4 replies
  • 4505 views
Hi
we are in the process of migrating from CF6.1 + oracle 8i to coldfusion 8 + oracle 10g and I keep having this error in the log files:"Element NATIVEERRORCODE is undefined in CFCATCH."
I think the error is happening somewhere in this codes:
<cfcatch type="any">
<cfset ok = false>
<cfif request.debug>
<cfoutput>
#cfcatch.message#<br><br>#cfcatch.detail#
</cfoutput>
</cfif>
<cfset validPageRequest = true>
<cfinclude template="../../o_generic/cfm/cf_log_err.cfm">
</cfcatch>
Any ideas??

Thanks in advance
    This topic has been closed for replies.

    4 replies

    HawthornThistleberry
    Participant
    June 17, 2015

    (Sorry for the necro, happened upon this old post)

    Is it because you're catching type="all" but nativeerrorcode is only defined for type="database" and will be non-present for any other type?

    mguellouhAuthor
    Participant
    April 25, 2008
    Sorry, in the last cfprocparam value="#cfcatch.NativeErrorCode#" has been added by me so it wasn't in the original code.
    mguellouhAuthor
    Participant
    April 25, 2008
    Here is cf_log_err.cfm file. I am completely lost cause I haven't wrote this code.

    Thanks

    <cfprocessingdirective pageencoding="ISO-8859-15" />
    <!---
    -- Description: This include page will record cfcatch details to the odyssey db. Error logged even if a transaction ROLLBACK is issued.
    -- If log not recorded successfully p_id returns -1.
    -- This include assumes CFCATCH variables are in scope, i.e. include call placed inside <CFCATCH> tags.
    -- Version | Date and Time | Who |What's changed
    --->

    <cfif IsDefined("validPageRequest")
    AND validPageRequest>

    <!--- log cfcatch error if switch ON --->
    <cfif IsDefined("request.log_cf_errors")
    AND request.log_cf_errors>

    <!---
    call log_cf_err storedprocedure, trim extra characters off p_err_messsage and p_err_detail if required.
    return unique id of logged error.
    --->
    <cfstoredproc procedure="p_ody_utilities.log_cf_err" datasource="#dsn#">
    <cfprocparam dbvarname="p_err_type" type="IN" cfsqltype="cf_sql_varchar" value="#cfcatch.Type#">
    <cfprocparam dbvarname="p_err_message" type="IN" cfsqltype="cf_sql_varchar" value="#Left(cfcatch.Message,255)#">
    <cfprocparam dbvarname="p_err_detail" type="IN" cfsqltype="cf_sql_varchar" value="#Left(cfcatch.Detail,1024)#">
    <cfprocparam dbvarname="p_user_login_name" type="IN" cfsqltype="cf_sql_varchar" value="cmedgar">
    <cfprocparam dbvarname="p_user_ip_address" type="IN" cfsqltype="cf_sql_varchar" value="#cgi.REMOTE_HOST#">
    <cfprocparam dbvarname="p_template_path" type="IN" cfsqltype="cf_sql_varchar" value="#cgi.SCRIPT_NAME#">
    <cfprocparam dbvarname="p_referer_path" type="IN" cfsqltype="cf_sql_varchar" value="#cgi.HTTP_REFERER#">
    <cfprocparam dbvarname="p_id" type="OUT" cfsqltype="cf_sql_numeric" variable="p_id" value="#cfcatch.NativeErrorCode#">
    </cfstoredproc>

    </cfif>

    </cfif>
    Inspiring
    April 24, 2008
    <cfinclude template="../../o_generic/cfm/cf_log_err.cfm">

    look in that file.

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/