Created
January 31, 2019 02:29
-
-
Save shiopon01/a0e59d840279d90cedf6936852c9edb9 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
const checkName = (name) => { | |
if (name.length > 5) { | |
return true; | |
} | |
throw new Error("My Error"); | |
} | |
const name = 'piyo' | |
// | |
try { | |
checkName(name) | |
} catch (err) { | |
next(err) | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment