Created
July 3, 2013 17:17
-
-
Save fizzy33/5920667 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
def s = new Singleton() | |
try { | |
log("--log-- started") | |
s.main() | |
} catch (e) { | |
log("--log-- " + throwableToString(e)) | |
} finally { | |
log("--log-- done") | |
} | |
class Singleton { | |
String throwableToString(Throwable th) { | |
def sw = new java.io.StringWriter() | |
def pw = new java.io.PrintWriter(sw) | |
th.printStackTrace(pw) | |
sw.toString() | |
} | |
def main() { | |
ask("hello world",[ | |
attempts: 5, | |
bargein: true, | |
choices: "1, 2, 3, #", | |
mode: "dtmf", | |
timeout: 6.0 | |
]) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment