Created
September 17, 2014 11:44
-
-
Save YellowAfterlife/34c9df7e3ffaada83907 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
static function tryNormal() { | |
var r; | |
try { | |
r = 'normal'; | |
} catch (_:Dynamic) { | |
r = null; | |
} | |
return r; | |
} | |
static function tryCompact() { | |
var r = null; | |
try { | |
r = 'compact'; | |
} catch (_:Dynamic) { | |
} | |
return r; | |
} | |
static function tryReturn() { | |
try { | |
return 'return'; | |
} catch (_:Dynamic) { | |
return null; | |
} | |
} | |
static function tryReturnCompact() { | |
try { | |
return 'returnCompact'; | |
} catch (_:Dynamic) { | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment