projects
/
errhandle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a78609
)
improve doc
author
Ian Kelling
<ian@iankelling.org>
Wed, 23 Apr 2014 07:36:11 +0000
(
00:36
-0700)
committer
Ian Kelling
<ian@iankelling.org>
Fri, 12 Aug 2016 22:34:39 +0000
(15:34 -0700)
errcatch-function
patch
|
blob
|
blame
|
history
diff --git
a/errcatch-function
b/errcatch-function
index 0a92c1a8287a2c02f5cb1ad4985049d51a06fc27..14ebe335c4a3a304693dc2e13d3a540f2055655e 100644
(file)
--- a/
errcatch-function
+++ b/
errcatch-function
@@
-13,7
+13,9
@@
# See the License for the specific language governing permissions and
# limitations under the License.
-catcherr() { # Exit on all errors. Print useful information.
+# General purpose bash error handling setup
+# Exit on all errors. Print useful information.
+catcherr() {
set -eE;
trap 'echo "${BASH_COMMAND:+BASH_COMMAND=\"$BASH_COMMAND\" }
${FUNCNAME:+FUNCNAME=\"$FUNCNAME\" }${LINENO:+LINENO=\"$LINENO\" }\$?=$?"' ERR