Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
17 years ago
Dmitry Stogov
d5ef2f466c
Added support for lambda functions and closures
18 years ago
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
18 years ago
Sebastian Bergmann
4223aa4d5e
MFH: Bump year.
19 years ago
Andi Gutmans
61e93ccfe8
- Update copyright notices to 2006
20 years ago
Marcus Boerger
16177d63f2
- MFH Move reflection to its own extension
# As discussed with RM
20 years ago
foobar
916815b779
Bump up the year
21 years ago
Zeev Suraski
00ed3bad29
Centralize exceptions code in zend_exceptions.[ch].
Remove zend_default_classes.h (use zend_exceptions.h instead)
NOTE: This currently breaks the build, fixes to php-src and pecl coming
soon
22 years ago
Zeev Suraski
d9630a595b
Exceptions updates:
- Enforce exceptions to be derived from class Exception. This allows
users to perform catch-all. It's not yet complete, so don't get
comfortable with it just yet :) Updates are coming soon.
- Implement zend_throw_exception() using zend_throw_exception_ex()
22 years ago
Zeev Suraski
b6e14b44b4
Fix bug #27186
22 years ago
Zeev Suraski
9e60cb553f
Rewrote exception support. Fixes a few limitations and bugs in the old
implementation, and allows exceptions to 'fire' much earlier than before.
Instructions on how to use the new mechanism will follow on internals@
shortly...
Note - this (most probably) breaks the current implementation of
set_exception_handler()
22 years ago
Marcus Boerger
c4c6d5213a
Fix internal access to exception properties
22 years ago
foobar
ccfc46b0aa
- Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
22 years ago
Andrei Zmievski
85f62caad2
Do not show exception message if it's empty.
# Is there a way to preserve the case of the exception class here?
22 years ago
Andrei Zmievski
87c2ba22f1
Make default message look better.
22 years ago
Marcus Boerger
30af3ba523
Show the exception message again after __toString() magic has been dropped.
22 years ago
Ilia Alshanetsky
aa1b20614b
Fixed crash demonstrated with ext/dom/tests/dom003.phpt test case.
22 years ago
Marcus Boerger
0091b5ca1d
Check return value of exception::__tostring()
23 years ago
Marcus Boerger
9ffd44e94a
Make exception code more robust:
- Fix error in calculation of trace-string length
- Allow to overload __strostring() and make it work for uncaught exceptions
- Show exception thrown while displaying exceptions
23 years ago
Marcus Boerger
da8ce17f7a
This forces a better error message for non working clone calls.
23 years ago
Marcus Boerger
cad49f1fb0
And use things to throw an exception here
23 years ago
Marcus Boerger
4625529abe
You shall not clone Exception instances
23 years ago
Marcus Boerger
8abb3bd448
Impement userspace iterator interfaces and tests. See tests for details
on the names.
23 years ago
Marcus Boerger
0bb59f337b
The string conversion method should be named __toString()
23 years ago
Marcus Boerger
25aa8b715e
Added c-api for iterators
# After 4 Month work and endless discussions...
23 years ago
Marcus Boerger
d148ff770f
Fix cast function
23 years ago
Marcus Boerger
755c404d08
Use studlyCaps in exception class
23 years ago
Marcus Boerger
6f78de02f0
Use type instead of constant
23 years ago
Marcus Boerger
fdf3fbadf0
Disallow to changing the backtrace
23 years ago
Marcus Boerger
0e3918732e
Provide string casting for exceptions by calling toString()
23 years ago
Marcus Boerger
7bbbd5035d
Fix handling of static properties initialized to arrays
23 years ago
Marcus Boerger
f03801bdd6
Don't loose information if no parameters were shown.
# Noticed by Sebatian Bergmann
23 years ago
Marcus Boerger
d7fa986db8
Show {main} and prevent showing empty stack traces
23 years ago
Marcus Boerger
0036ed9064
Clearify this
23 years ago
Sebastian Bergmann
07ef05adb5
Revert what I think is an accidental commit by Marcus that slipped in at revision 1.23. Declaring getMessage() as final is a PITA, so I hope it will not come to that.
23 years ago
Marcus Boerger
f9ee319152
Excluded chars < 32 when displaying string parameters that would obliterate output.
23 years ago
Marcus Boerger
d45fd8a1b1
Make vspprintf available as zend utility function. Use it in exception output.
23 years ago
Marcus Boerger
00fddc9b83
Actually fetch the parameter
23 years ago
Marcus Boerger
f1c92fa4c5
- Calling abstract methods should be a error for consistency reason.
- So in reflection_api we use the reflection_exception again.
23 years ago
Marcus Boerger
80c0cdf7f7
Even though it is ignored this should be correct
23 years ago
Marcus Boerger
655f2dc572
Add frame numer and finally display stack trace in the message.
#
# And voila - nice useable and helpfull exceptions in PHP.
# Now we need to tell ppl 'anyway don't use them if possible'.
#
23 years ago
Marcus Boerger
c80eb4573f
Add exception::traceAsString() and exception::toString()
23 years ago
Marcus Boerger
f7f49e4584
- The compiler can't detect all abstract function calls so we need to check.
# In this case throwing a dedicated exception is better than the error we
# show when the compiler can detect the abstract call because its run-time.
23 years ago
Marcus Boerger
ad31a021bc
Make those final (see comment)
23 years ago
Marcus Boerger
bdd2d4aacf
Need to tell zend_fetch_debug_backtrace() whether to skip top function or not.
# And i wondered why the trace wasn't rally accurate.
23 years ago
Marcus Boerger
b3f3ddd1b5
Add public read access to protected
23 years ago
Marcus Boerger
fa70708d15
Add zend_throw_exception_ex() which allows to format exception messages.
#
# Since we don't have any portable way of printing into a dynamic buffer i
# used a stack buffer of 1K (just like the error printing) and used a dynamic
# buffer in case the necessary function is available.
#
23 years ago
Marcus Boerger
8d3620aea8
- Split debug_backtrace() into lowlevel c function and php function wrapper
- Add trace property to default method based on new zend_fetch_debug_backtrace
# Unforunatley the handler for uncaught exception can't show this backtrace
# simply because there is currently no way to do it. If i can think of a
# solution i'll add it. Until them i am open to any ideas/help.
23 years ago
Marcus Boerger
19ec7a09fc
- Provide appropriate way to destroy internal zval's.
- Allow internal zval's of type string and disallow complex types.
- Define the default string for extensions at class level instead of ctor.
23 years ago
Marcus Boerger
4e5e7502b8
Allow to throw instances of classes derived from exception
23 years ago