Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved BugError message with BASH_SOURCE and WORKFLOW #1075

Merged
merged 2 commits into from Nov 22, 2016

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Nov 22, 2016

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 jsmeix added the enhancement Adaptions and new features label Nov 22, 2016
@jsmeix jsmeix added this to the Rear 2.00 milestone Nov 22, 2016
@jsmeix jsmeix self-assigned this Nov 22, 2016
@jsmeix
Copy link
Member Author

jsmeix commented Nov 22, 2016

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
Copy link
Member Author

jsmeix commented Nov 22, 2016

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

@jsmeix
Copy link
Member Author

jsmeix commented Nov 22, 2016

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
Copy link
Member Author

jsmeix commented Nov 22, 2016

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant