Wrapped body of parse() in try-catch block to avoid unhandled exceptions

If an exception is caught a platform object with a parse function returning null is returned,
which can be caught in the calling function:
```
  browser = require('platform').parse(userAgentString)
  if browser?
    ...
```