Skip to content

Intelligent Error Handling #37

@0x6d6f7468

Description

@0x6d6f7468

Add intelligent error handling to scripts.

My current plan is to use the following function:

runcmd() {
        $1 2>/dev/null;
        s=$(($s+$?));
}

where $s is a local variable for status code (subject to change), and $1 is the command to be executed. This is a concise way to keep track of return codes, because most errors that can be encountered are not fatal to the script. This way, we can simply return $s from the end of both install and uninstall functions and the caller can handle the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions