Skip to content

Instantly share code, notes, and snippets.

@nfroidure
Last active December 11, 2015 21:29
Show Gist options
  • 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