giabao/php-unserializer — pull request #1 by ashawley (2013-12-02 21:13:56+00:00)
Title: Improve error handling.

* src/test/scala/com/sandinh/phpparser/PhpUnserializerSpec.scala
(parse bool): Add corner case when empty.
(not parse invalid bool)
(not parse invalid int)
(not parse invalid float)
(not parse the empty string)
(not parse an invalid string)
(not parse string when length is missing)
(not parse when string is missing)
(not parse invalid array)
(not parse array when length is missing)
(parse empty array)
(not parse array when values missing)
(parse stdClass)
(not parse invalid object)
(not parse when object length is missing)
(not parse when object is missing): New tests.

* src/main/scala/com/sandinh/phpparser/PhpUnserializer.scala
(parse): Add exception handling.
(parseDelimiter): New method.
(parseBoolean,parseFloat,parseInt,readLength): Use parseDelimiter.
(parseString,parseObject): Add exception handling.