Bixby Developer Center

Guides
References

halt

optional

Effect that halts execution after a dialog message event. You can use halt within an on-empty, on-catch, or ordered-effects block.

Examples

action (GetResultHalt) {
type (Search)
description (This will never succeed, and will always halt.)
collect {

}
output (Result) {
throws {
error (ErrorWhichHalts) {
on-catch {
halt {
dialog {
template ("Execution is halted because of the ErrorWhichHalts error.")
}
}
}
}
}
}
}

View master on GitHub

In the example below, a capsule checks to see if there is no data available and throws a NoData checked error.

//if response is bad, throw NoData error
if (!response || response.failure || !response.globalairquality)
throw fail.checkedError('no air quality data', 'NoData')

The output of the GetAirQuality action in that capsule catches this error and uses a noDataAirQuality dialog macro to provide a useful error using on-catch and halt:

action (GetAirQuality) {
description (Get the air quality for a location)
type (Search)

...

output (AirQuality) {
throws {
error (NoData) {
on-catch {
halt {
dialog {
macro(noDataAirQuality)
}
}
}
}
}
}
}

The actual definition of the macro (macro-def) looks like this:

macro-def(noDataAirQuality){
content: template ("No air quality data available.")
}
Note

Dialog associated with halt effects will always have a Short timeout value unless the short-timeout-on-halt-dialog runtime flag is set to false.

Child Keys

dialog
optional
An output dialog template that should be rendered when execution halts
display
optional
An expression that will resolve to a result that should be rendered when execution halts