Commit Graph

80 Commits

Author SHA1 Message Date
Marcus Boerger
0036ed9064 Clearify this 2003-09-01 20:02:47 +00:00
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. 2003-09-01 17:26:57 +00:00
Marcus Boerger
f9ee319152 Excluded chars < 32 when displaying string parameters that would obliterate output. 2003-08-31 12:40:29 +00:00
Marcus Boerger
d45fd8a1b1 Make vspprintf available as zend utility function. Use it in exception output. 2003-08-31 09:35:54 +00:00
Marcus Boerger
00fddc9b83 Actually fetch the parameter 2003-08-30 23:55:04 +00:00
Marcus Boerger
f1c92fa4c5 - Calling abstract methods should be a error for consistency reason.
- So in reflection_api we use the reflection_exception again.
2003-08-30 23:51:42 +00:00
Marcus Boerger
80c0cdf7f7 Even though it is ignored this should be correct 2003-08-30 19:01:10 +00:00
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'.
#
2003-08-30 18:58:40 +00:00
Marcus Boerger
c80eb4573f Add exception::traceAsString() and exception::toString() 2003-08-30 18:28:24 +00:00
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.
2003-08-30 11:40:37 +00:00
Marcus Boerger
ad31a021bc Make those final (see comment) 2003-08-30 11:33:41 +00:00
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.
2003-08-29 00:16:00 +00:00
Marcus Boerger
b3f3ddd1b5 Add public read access to protected 2003-08-28 23:43:56 +00:00
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.
#
2003-08-28 22:56:41 +00:00
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.
2003-08-28 20:35:54 +00:00
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.
2003-08-24 17:32:47 +00:00
Marcus Boerger
4e5e7502b8 Allow to throw instances of classes derived from exception 2003-08-24 15:07:00 +00:00
Marcus Boerger
d3473d1f58 - Provide a unified way to display uncaught exceptions, which shows
file/line/message info if possible.
- Add zend_eval_string_ex() to be able to handle exceptions in eval'd code.
- Use above function to fix memleaks in CLI.
2003-08-24 13:10:03 +00:00
Marcus Boerger
d4cf96c524 Make use method macros 2003-08-24 11:25:08 +00:00
Marcus Boerger
38805f2809 Add property read code and use that in default exception class 2003-08-24 00:36:53 +00:00
Marcus Boerger
c3d60fd7ff Allow zend_throw_exception() to also set the exception code 2003-08-23 19:48:52 +00:00
Marcus Boerger
96fa63d6bf Exception has 4 protected default properties (message,code,file,line).
They are all initialized at c-level constructor correctly.
2003-08-23 19:41:22 +00:00
Marcus Boerger
43334207ab Make exception code more robust 2003-08-23 14:22:28 +00:00
Marcus Boerger
0e32aaa8c6 Add function 'zend_throw_exception(char *message, int duplicate TSRMLS_DC);'
to provide an easy way to throw exceptions for extension developers.
2003-08-21 23:32:13 +00:00
George Schlossnagle
aa96d17022 added support for Reflection_Function, the first part of
the reflection api
2003-06-30 20:03:56 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sterling Hughes
6f32f79cae add an accessor for the default exception 2003-05-03 23:54:57 +00:00
Sebastian Bergmann
2698a4bd05 ZTS fix. 2003-03-23 17:18:31 +00:00
Sebastian Bergmann
2dc388e73e Add new files to ZendTS.dsp. Sync list of files in Zend.dsp with ZendTS.dsp. ZTS fixes. 2003-03-23 06:57:16 +00:00
Sterling Hughes
e6dfbc9565 add a standard Exception class. 2003-03-23 04:32:24 +00:00