Commit Graph

1028 Commits

Author SHA1 Message Date
Aaron Piotrowski
a1a83bf5f0 Switch code on thrown TypeError and ParseError to 0, update related tests 2015-07-07 16:54:39 -05:00
Dmitry Stogov
2f7b178fac Fixed test (shift operators throw Error) 2015-07-06 12:28:14 +03:00
Anatol Belski
a97f764472 bring back the division by zero warning 2015-07-05 20:18:17 +02:00
Xinchen Hui
e8f992c163 Catch the specifical exception 2015-07-03 11:18:53 +08:00
Bob Weinand
94722e12cf Introduce ArithmeticError 2015-07-02 20:47:44 +02:00
Bob Weinand
007d7ac7ca Use DivisionByZeroError instead of exception for %/intdiv() 2015-07-02 02:20:58 +02:00
Bob Weinand
f9724b93f6 Remove warning upon division by zero 2015-07-02 02:20:58 +02:00
Dmitry Stogov
66031cfe19 Restored old behavior 2015-06-29 14:10:46 +03:00
Dmitry Stogov
0b35e4a3be Revert "Fixed last previously broken tests"
This reverts commit 79b1832dd5.
2015-06-29 13:05:14 +03:00
Bob Weinand
79b1832dd5 Fixed last previously broken tests 2015-06-29 01:00:12 +02:00
Bob Weinand
e5fae77969 Show full signature upon inheritance mismatch 2015-06-29 01:00:12 +02:00
Nikita Popov
8a83aed458 Drop duplicate object-to-type notices
We already generate a recoverable fatal for these earlier, no need
to throw an additional notice.
2015-06-22 16:25:32 +02:00
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Andrea Faulds
05ef3b7c0d Fix typo in Unicode escape test 2015-06-06 15:29:56 +01:00
Bob Weinand
886cbea94f Merge context sensitive lexer RFC 2015-05-25 18:38:40 +02:00
Nikita Popov
4ea1d8a9c7 Show argument causing TypeException in trace
Not sure why that check was there, did I miss something?
2015-05-20 18:28:09 +02:00
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski
fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov
440481fb3e Display TypeExceptions like normal exceptions
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
2015-05-17 19:54:12 +02:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Márcio Almada
a54e1237ec add tests for semi reserved words and remove obsolete ones 2015-04-30 03:03:29 -03:00
Dmitry Stogov
5820be029a 0.0 / 0.0 = NaN 2015-04-06 22:03:44 +03:00
Dmitry Stogov
cae0147ed3 Fixed weird operators behavior. Division by zero now emits warning and returns +/-INF, modulo by zero and intdid() throws an exception, shifts by negative offset throw exceptions. Compile-time evaluation of division by zero is disabled. 2015-04-06 14:30:05 +03:00
Nikita Popov
a8bf1c5d8f Throw ParseException from lexer
Primarily to avoid getting fatal errors from token_get_all().

Implemented using a magic E_ERROR token, which the lexer emits to
force a parser failure.
2015-04-02 16:31:17 +02:00
Nikita Popov
8d00385871 Reclassify E_STRICT notices
Per RFC https://wiki.php.net/rfc/reclassify_e_strict

While reviewing this, found that there are still three E_STRICTs
left in libraries - need to discuss those.
2015-04-01 11:17:55 +02:00
Nikita Popov
6ef9216269 Finish PHP 4 constructor deprecation 2015-03-31 17:55:27 +02:00
Andrea Faulds
db76b708cf Deprecate PHP 4 constructors 2015-03-31 17:55:27 +02:00
Kalle Sommer Nielsen
5e9036a2a1 Another CRLF test fix 2015-03-26 03:18:42 +01:00
Dmitry Stogov
7cf05ce8da Fixed error messages 2015-03-20 17:26:12 +03:00
Anthony Ferrara
0529eeb4a6 Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages 2015-03-18 15:22:21 -04:00
Anatol Belski
b9bc84e29e use default test timeout 2015-03-16 23:07:33 +01:00
Anatol Belski
fd51bd4a9e test fixes + added skipif for slow tests 2015-03-16 13:55:40 -07:00
Anatol Belski
042dd8602e use busy sleep instead of sleep() for timeout tests 2015-03-16 13:21:33 -07:00
Anatol Belski
cab21b9347 test timeout with shutdown function, variation 2015-03-16 19:37:07 +01:00
Anatol Belski
1d6f94eeef test timeout with shutdown function 2015-03-16 19:35:36 +01:00
Anatol Belski
33d832bd45 test timeout with foreach loop 2015-03-16 19:30:04 +01:00
Anatol Belski
b05635ade9 test timeout with for loop 2015-03-16 19:28:01 +01:00
Anatol Belski
eab7da4bc9 test timeout with exception variation 2015-03-16 19:26:17 +01:00
Anatol Belski
1c0fce922e test timeout with exception 2015-03-16 19:21:58 +01:00
Anatol Belski
8f1fa842cd fix timeout with cal_user_func 2015-03-16 19:16:09 +01:00
Anatol Belski
7a7d8b9f9d test timeout within eval() 2015-03-16 19:12:55 +01:00
Anatol Belski
82d3a13983 test timeout with array_walk 2015-03-16 19:05:21 +01:00
Anatol Belski
f591c0dff8 test timeout within function 2015-03-16 19:01:23 +01:00
Anatol Belski
394bd2ab41 test timeout within while loop 2015-03-16 18:58:32 +01:00
Dmitry Stogov
ed9c8a23ba More accurate reference counting on closures 2015-03-10 23:04:41 +03:00
Dmitry Stogov
a30d328671 Errors converted to exceptions are not "recoverable" anymore. 2015-03-10 10:31:55 +03:00
Dmitry Stogov
1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00
Reeze Xia
31d5b65c74 Fix test 2015-03-03 22:56:23 +08:00