Skip to content

Instantly share code, notes, and snippets.

@indongyoo
Created April 3, 2018 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indongyoo/0533069edda508dfb5e3a32366788341 to your computer and use it in GitHub Desktop.
Save indongyoo/0533069edda508dfb5e3a32366788341 to your computer and use it in GitHub Desktop.
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