Tropo Scripting Development Guide Home  |  Frameset Home


error  event


This event is returned whenever an unexpected, significant system error occurs, such as the ASR engine failing. This should be a very rare event; it's unlikely to be encountered with any regularity, if at all.


usage

error( , {anonymous function: STRING } )


attributes

none


code samples

JavaScript example
event=ask("Who would you like to call?  Just say John or Jane", {
    choices:"john, jane",
    onError:function(event) { 
        log("There was an error");
    }}
);


Ruby example
event=ask "Who would you like to call?  Just say John or Jane", {
    :choices => "john, jane",
    :onError => lambda { |event|
        log "There was an error"}
    }



PHP example
<?php
ask("Who would you like to call?  Just say John or Jane", array(
    "choices"=>"john, jane",
    "onError" => "errorFCN"
    )
);
function errorFCN($event) {
    log("There was an error");
}
?>



Python example
ask("Who would you like to call?  Just say John or Jane", {
    "choices":"john, jane",
    "onError": lambda event : log("There was an error")
})




Groovy example
ask("Who would you like to call?  Just say John or Jane", [
    choices: "john, jane",
    onError: { event->
        log("There was an error")}
    ])



additional links

none


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site