Search found 3178 matches

by Ollie Saunders
Wed Sep 30, 2009 4:22 pm
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

I'm so badly in the wrong place here. I don't think you'll hear from me again. Goodbye.
by Ollie Saunders
Wed Sep 30, 2009 8:03 am
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

Hehe, I managed to confuse everyone. Anyway, thanks for making the multiple catch block point, I'd forgotten about that. declaring type as string is not a good idea Huh? What am I declaring as a string? and if you catch an exception you would want to do something your example does return exception? ...
by Ollie Saunders
Tue Sep 29, 2009 8:55 pm
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

No, that version of catch would execute the code inside as try does, only it would also catch any exceptions that occur too.
by Ollie Saunders
Tue Sep 29, 2009 7:15 pm
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

$ex = catch {   // some code that might thrown an exception.   while (...) {      // code in the while loop that could cause an exception, ending the loop.      $ex = catch {          // code that should not end the while loop      }      // inner error handler (the loop could continue in the event...
by Ollie Saunders
Tue Sep 29, 2009 3:11 pm
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

Oh right, yes. You saying "convention", confused me, because I don't associate language design with adhering to conventions, or even, many conventions existing across programming languages. But I see that is probably wrong, now.
by Ollie Saunders
Tue Sep 29, 2009 12:07 pm
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

I think the try -> catch structure is more convention than necessity.
It's a syntactical requirement; catch may not appear without try.
by Ollie Saunders
Tue Sep 29, 2009 6:51 am
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

Now that I think about it PHP, could perceivably, have an even shorter syntax for returning thrown exceptions: var_dump(catch throwingExplode('/', 'foo/bar/zim')); or possibly: var_dump(catch { throwingExplode('/', 'foo/bar/zim'); }); I don't see why "try" is necessary at all. In Fluidics,...
by Ollie Saunders
Tue Sep 29, 2009 6:36 am
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

When would an exception be constructed and not thrown? If you are extending exceptions in some way (adding new functionality, for instance), then, testing that new functionality will involve instantiating the new extended exceptions without throwing them; the capability of being thrown doesn't need...
by Ollie Saunders
Mon Sep 28, 2009 7:12 pm
Forum: PHP - Theory and Design
Topic: Performance implications of constructing an exception
Replies: 29
Views: 8462

Re: Performance implications of constructing an exception

For me, they occur and the application stops, it's not like there are 10 exceptions thrown in each invocation of every script. At one point, I was considering a course of action where exceptions would be thrown and caught, potentially, hundreds of times, which is why I made this thread. :-) And, ju...
by Ollie Saunders
Mon Sep 28, 2009 3:15 pm
Forum: PHP - Code
Topic: redirecting[SOLVED]
Replies: 16
Views: 1944

Re: redirecting

Oh, FFS.
by Ollie Saunders
Mon Sep 28, 2009 3:08 pm
Forum: PHP - Code
Topic: redirecting[SOLVED]
Replies: 16
Views: 1944

Re: redirecting

I'm after the full path of the script, as it is stored on your filesystem. You should be able to find that by right-clicking on the file in explorer, choosing properties, and copy-pasting the path from that properties dialog. The path should include the file's name as well, if it doesn't, please tel...
by Ollie Saunders
Mon Sep 28, 2009 2:53 pm
Forum: PHP - Code
Topic: redirecting[SOLVED]
Replies: 16
Views: 1944

Re: redirecting

OK, that means your web server is Apache. If you can, try and find out what the document root of Apache is configured to. I guess, there'll be some configuration system for XAMPP where that is set, so, you can find out from there.

Also, what is the full path of the PHP script?
by Ollie Saunders
Mon Sep 28, 2009 2:44 pm
Forum: PHP - Code
Topic: redirecting[SOLVED]
Replies: 16
Views: 1944

Re: redirecting

What OS are you running?
What web server are you running?
by Ollie Saunders
Mon Sep 28, 2009 2:26 pm
Forum: PHP - Code
Topic: redirecting[SOLVED]
Replies: 16
Views: 1944

Re: redirecting

OK, then you're not even running the code that you posted. Does it help to know that? If not, I'm not sure what else I can suggest. If you don't know what files are being run, where, I can't help you. I wonder if you're using frames, which are complicating things.