On Mon, 21 Jan 2002, Mithun Bhattacharya wrote: > Perrin Harkins wrote: > > > Umm I didnt mean to offend anyone in my previous posting - I did say I > probably hadnt presented my situation properly.
I don't think anyone was offended. Perrin was just trying to help you see why people might not have replied. That's what I got from the tone anyway. > > The Apache::ePerl code is very simple, and I suggest you read it at some > > point. It attempts to eval() your code, and does the behavior you saw > > if it fails (which is what happens when your script does a die()). I > > don't think you can change that without changing the code, but that's > > pretty easy to do. > > My problem is that die works fine as such but it conks out if done > inside a eval. > > ---------------------- > <% > die "blah blah blah"; > %> > ---------------------- > > redirects me to the default error page. > > ---------------------- > <% > eval {die "blah blah blah";}; > %> > ---------------------- > > on the other hand says the following. > > ---------------------- > Apache::ePerl > Version 2.0214 > > ERROR: > Error on evaluating script from P-code > > Contents of STDERR channel: > > blah blah blah at /xxxx/test.html line 2. > ---------------------- It looks to me like the generated code that ePerl is trying to eval is bad. That seems like it's most likely this is an actual ePerl problem, and so the only thing I can suggest is you hack the ePerl code to actually display $@ when the evaluation of the "script from P-code" occurs (why on earth aren't they doing that already??). Also I suggest while you're in there, have it print the script to STDERR before doing the eval, so you can check the error log and see what ePerl thinks your parsed script looks like. > I am not sure why that might be considered acceptable response but it > really makes my code a lot more messier trying to circumvent that. > > If I could have fixed Apache::ePerl I wouldnt be asking the question > here - I usually dont go around asking questions to show people how much > I know about anything. I am not asking to be spoonfed or something but > if there is something which can be done without changing the > Apache::ePerl code I would opt for that. It feels like being told to > change gcc's code if my C code is not working :) - yah both of them are > written in C . The difference being that gcc is maintained, so you might stand a cat in hell's chance of some help from the authors or getting a bug fix. Unfortunately ePerl isn't maintained, so you have to open the bonnet (hood to USians) and fix things yourself. -- <!-- Matt --> <:->Get a smart net</:->