Skip to content

Instantly share code, notes, and snippets.

@nfroidure
Last active December 11, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nfroidure/4663042 to your computer and use it in GitHub Desktop.
Save nfroidure/4663042 to your computer and use it in GitHub Desktop.
How to handle errors on chaining APIs
// Chaining API for URIBuilder
var uri=new URLBuilder().parse('bad_url_format').addQueryParam('param','value').setPort('443').toString();
// How to handle the bad url parse error ?
// Don't want to throw exception
// Can't return null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment