0

So I first extract a single file from a ipa file(.plist file ) and then parse it with https://github.com/rodneyrehm/CFPropertyList.

Here is my php script:-

<?php 

error_reporting( E_ALL );
ini_set( 'display_errors', 'on' );

namespace CFPropertyList;
?>

I want to first try parsing binary string but it fails with error "Fatal error: Uncaught exception 'CFPropertyList\PListException' with message 'Invalid binary string!' "

I tried:-

    catch(\PListException $e)
    catch("CFPropertyList\PListException" $e)
    catch(CFPropertyList\PListException $e)

but none of them works. Any workaround ?

2
  • You could be all-inclusive and catch (\Exception $e).
    – Baldvin Th
    Commented Oct 23, 2014 at 19:55
  • If you could put this as answer, I could approve this answer and +1 too.:)
    – Yash Sodha
    Commented Oct 23, 2014 at 19:58

1 Answer 1

1

When in doubt you can be all-inclusive and use catch (\Exception $e) instead.

Not the answer you're looking for? Browse other questions tagged or ask your own question.