This content has been marked as final. Show 6 replies
I think you will have better luck switching from application.cfm to application.cfc. Then instead of using cferror, you can put whatever code you want into the onError function.
hello and thanks for the reply.
we're actually using coldfusion mx 6, so I can't go for application.cfc at the moment, as it will take at least another half year until we start migration directoly to coldfusion 8.
therefore, I'd still be very pleased if you have any suggestions on my issue, as I really dont know if I'm missing something there. As for the custom exception: I dont have to create any java classes or components for the exceptions, right? only give the exceptions name when throwing and checking for it on cferror. that should be it, right?
What condition you have before your <cfthrow> statements?
<cfif arguments.number lt 16>
very simple. only prototyping.
input is 12. so the sendToDev is throwed and the first cferror with mail email@example.com should react. but the other one does. also, if the input is 17.
and if i declare the cferrors the other way round:
then, the sendToDev cferror is always called, not mattering what input I give.
Try something like this,
unfortunately, it doesnt change anything.
maybe I should just post you the whole prototype application as i run it here. i tried to keep it as simple as possible and added a short comment to describe what file is shown in the code, so you dont have to read thru a big bunch of code.
in this example with the input value 12, the output of the handleError.cfm looks like this:
msg: 12 - mail sent to dev.
of course, this is not what I would like to see. if cferror would react as wanted, the answer mailto should be firstname.lastname@example.org