Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to Output Error Message to page

Participant ,
Mar 19, 2024 Mar 19, 2024

I have a server with hard to access error logs.

 

I keep getting an error on a certain page.

 

Is there a way for me to output the error to the page, instead of just seeing the generic 500 error message?

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

216
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2024 Mar 20, 2024

An "internal server error" means just that. The error occurs at the level of the server, not at the level of code. Unless the code is server-related.

 

What do the log files coldfusion-out.log, coldfusion-error.log and server.log say? If the error is triggered by server-related code, a try/catch might provide more information:

<cfscript>
	try {
    	// bothersome code
	}
	catch (any e) {
	    writedump(var=e, label="Exception");
	}
</cfscript>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 20, 2024 Mar 20, 2024
LATEST

BKBK's suggestion is the method we use most of the time, as well, in cases like this.  In some situations, where you don't want to potentially show the users the contents of an error message,  (continuing to use BKBK's method) you can put the DUMP into a CFMAIL and email the error to yourself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources