Skip to content

Better handle errors with bash equivalent of try/catch/finally #7

@kiprasmel

Description

@kiprasmel
{
	do_stuff
	doSomeMoreStuff
} || {
	check_for_error_1 && handle_error_1
	checkForError2 && handleError2
}

This will be useful in restoring the git stash, independent of either a failure or success.
This will probable require a finally thingie.
Or maybe consider wrapping the function up? Maybe?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions