Skip to content

Latest commit

 

History

History

error

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Error Handling

Error Dialogue

When the executed command outputs something to stderr, Tuw will display an error dialogue.

Error

{
    "command": "notcommand",
    "components": []
}

Exit Code Checking

If your command does not use stderr for error handling, you can use the check_exit_code option.
This option displays an error dialogue when the exit code is not 0.
You can also customize the success code using the exit_success option.

{
    "command": "echo exit code is zero.",
    "check_exit_code": true,
    "exit_success": 10,
    "components": []
}

show_last_line Option

If your command neither uses stderr nor exit codes for error handling, you can use the show_last_line option.
It displays the last line from stdout.
When check_exit_code is enabled, it can also show the last line in the error dialogue.

ShowLastLine

{
    "command": "echo Fake Error!",
    "show_last_line": true,
    "components": []
}