grml/grml-debootstrap — pull request #31 by adrelanos (2014-08-08 17:30:56+00:00)
Title: better error handler

Implements #22 (better error handling).

I couldn't hesitate creating an implementation draft. Curious how you like this.

```
export REPORT_TRAP_ERR='yes'
```

Reports unexpected non-zero exit codes.

```
export FAIL_TRAP_ERR='yes'
```

Fails on unexpected non-zero exit codes.

I created a VM image using both options. Congratulations. So far no unexpected non-zero exit codes. If this gets merged, I suggest to leave it disabled by default in short term and to enable `export REPORT_TRAP_ERR='yes'` as developer/tester. It will report unexpected non-zero exit codes but not annoy any further. Later when we're really sure to have all exit codes under control we can consider making `export FAIL_TRAP_ERR='yes'` the default.