From c7732db305b0fedb5a8359718a81e280337ee8c9 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Sun, 6 Feb 2011 15:50:05 +0700 Subject: [PATCH] My idea --- tri.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tri.js diff --git a/tri.js b/tri.js new file mode 100644 index 0000000..d489069 --- /dev/null +++ b/tri.js @@ -0,0 +1,16 @@ +// My idea +tri({ + "try": function() { + console.log('this = ' + this); + this_is_protected(); + }, + "catch": function(e) { + it_failed({"exception_was": e}); + }, + "else": function() { + it_worked(); + }, + "finally": function() { + this_always_runs(); + } +})