#1075 PR merged: Improved BugError message with BASH_SOURCE and WORKFLOW

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2016-11-22 10:28:

Now e.g. during "rear mkbackup"
a code line in /usr/share/rear/path/to/foo.sh like

BugError "Unexpected bar"

would show this to the user:

ERROR: 
====================
BUG in /usr/share/rear/path/to/foo.sh:
'Unexpected bar'
--------------------
Please report this issue at https://github.com/rear/rear/issues
and include the relevant parts from /var/log/rear/rear-xxx.log
preferably with full debug information via 'rear -d -D mkbackup'
====================

jsmeix commented at 2016-11-22 10:31:

I think it helps a lot to have the source file where
BugError or BugIfError was called directly visible
for the user so that he could directly edit that file.

jsmeix commented at 2016-11-22 10:32:

If there is no furious objection, I will merge it soon...

jsmeix commented at 2016-11-22 10:37:

Strange:
I have changed the BugError function in
/usr/share/rear/lib/_input-output-functions.sh
but that change is not in this pull request.

jsmeix commented at 2016-11-22 10:42:

I found my mistake:
I had really changed
/usr/share/rear/lib/_input-output-functions.sh
(i.e. the one with the leading '/') instead of
usr/share/rear/lib/_input-output-functions.sh
(i.e. the one in my GitHub checkout directory).


[Export of Github issue for rear/rear.]