Created
April 3, 2018 12:40
-
-
Save indongyoo/0533069edda508dfb5e3a32366788341 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
pipe( | |
a => asdasdasd, | |
a => 10 | |
) | |
.error(e => match(e) | |
.case(e => e instanceof ReferenceError) ( | |
_ => console.log('ref 에러!') | |
).else ( | |
_ => console.log('에러!') | |
) | |
) (); | |
// ref 에러! | |
pipe( | |
a => { throw 'ho' }, | |
a => 10 | |
) | |
.error(e => match(e) | |
.case(e => e instanceof ReferenceError) ( | |
_ => console.log('ref 에러!') | |
).else ( | |
_ => console.log('에러!') | |
) | |
) (); | |
// 에러! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment