Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Dwight #1
Email Site-Wide Error message (with code snippet)
I would like to create a Site-Wide error message that is emailed to the
administrator. I have a lot of the information I want to put in but I can not
figure out how to include the code snippet that is included in the standard
CFMX 6.1 error message. This is very helpful in debuging seeing the source
code and the line numbers. Does anyone know how to get this?
Error
--------------------------------------------------------------------------------
--------------------
Variable WHATISTHIS is undefined.
The error occurred in E:\Intranet\Global\Support\Test2.cfm: line 12
10 : <cfoutput>
11 : My Variables: #MyVar#<br />
12 : My Error Var: #WhatIsThis#<br />
13 : </cfoutput>
14 : </body>
--------------------------------------------------------------------------------
--------------------
Thanks
Dwight
Dwight Guest
-
Site wide error
I have this in the site wide error box C:\error.cfm I know the page is there... But when I go to a page with an error on it, I can still see all... -
CFMX 6.1 Site Wide Error handler NOT working
We have many servers running CFMX 6.1 (app.commonapp.org thru app4.commonapp.org and beyond), each has an identical CF configuration however 2 of... -
CFERROR vs. site-wide error handler
Okay... I posted a comment in livedocs about the lack of any criteria for how to decide between using CFERROR and a site-wide error handler set up... -
Site-wide Error Handler
The Site-wide Error Handler page is loading , sometimes, at the top of a page that has been requested. This error does not show for all page users.... -
how to get error message when you using Site-wide ErrorHandler
Hi, Right now, I am try to setting coldfusion 5 using Site-wide Error Handler. Instead of using try catch to report error. however, it just... -
Stressed_Simon #2
Re: Email Site-Wide Error message (with code snippet)
I email my self the following which I find very handy!
Stressed_Simon Guest
-
Dwight #3
Re: Email Site-Wide Error message (with code snippet)
Simon,
Thanks for your reply. None of the code you provided gives me the code
snippet of where the error occurred in the code. I would like to get this:
10 : <cfoutput>
11 : My Variables: #MyVar#<br />
12 : My Error Var: #WhatIsThis#<br />
13 : </cfoutput>
14 : </body>
The doce you provided gave me this:
Address: 131.167.69.241
Template: /Global/Support/Test2.cfm or E:\Intranet\Global\Support\Test2.cfm
URL String:
Date: {ts '2005-05-05 12:43:15'}
Message: Variable WHATISTHIS is undefined.
The error occurred on line 12.
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)
Generated Content: My Variables: 5
My Error Var:
Referer:
Java Root Cause: coldfusion.runtime.UndefinedVariableException: Variable
WHATISTHIS is undefined.
Stack Trace: coldfusion.runtime.UndefinedVariableException: Variable
WHATISTHIS is undefined. at coldfusion.runtime.CfJspPage._get(Unknown Source)
at coldfusion.runtime.CfJspPage._autoscalarize(Unknow n Source) at
cfTest22ecfm1790952765.runPage(E:\Intranet\Global\ Support\Test2.cfm:12) at
coldfusion.runtime.CfJspPage.invoke(Unknown Source) at
coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:357) at
coldfusion.filter.CfincludeFilter.invoke(Cfinclude Filter.java:62) at
coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:107) at
coldfusion.filter.RequestMonitorFilter.invoke(Requ estMonitorFilter.java:43) at
coldfusion.filter.PathFilter.invoke(PathFilter.jav a:80) at
coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:47) at
coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
er.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:35) at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:43) at
coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22) at
coldfusion.CfmServlet.service(CfmServlet.java:105) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:252) at
jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527) at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:192) at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:451)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)
Any idea which error variable that gives the code snippet? Or is there a way
to capture the standard CF error and email it?
Thanks
Dwight
Dwight Guest
-
Stressed_Simon #4
Re: Email Site-Wide Error message (with code snippet)
I don't think you can get the actual code snippet but you do get what the
problem is and what line it occurred on and in what file. Which is pretty much
all you need. I find all that info invaluable and normally get most things
sorted without too much drama.
Stressed_Simon Guest
-
Dwight #5
Re: Email Site-Wide Error message (with code snippet)
Thanks Simon! You're right it does give you everything that you need, its just
so much nicer to see the code snippet. I figured that since the standard error
can do it that there would be a way to do it by a variable or something.
Thanks
Dwight
Dwight Guest
-
oak3 #6
Re: Email Site-Wide Error message (with code snippet)
This looks really useful, but I don't know where to stick this code so that errors get sent to me. Can you please give a newbie to this some information about how to do this?
Thanks,
Oak
oak3 Guest
-
Stressed_Simon #7
Re: Email Site-Wide Error message (with code snippet)
You need to read up on cferror
[url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p24.htm#wp2022557[/url]
Thje create a template to handle the error. At the top place a cfmail tag with
the info from the earlier threads.
HTH
Stressed_Simon Guest



Reply With Quote

