-
-
Save thom4parisot/4663058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Chaining API for URIBuilder | |
var uri = new URLBuilder() | |
.parse('bad_url_format', loggerErrorHandler) | |
.addQueryParam('param','value') | |
.setPort('443') | |
.toString(); | |
// How to handle the bad url parse error ? | |
// Don't want to throw exception | |
// Can't return null | |
function loggerErrorHandler(err, url_object){ | |
console.log(err.message); | |
return url_object; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment