[zypp-devel] Improve error reports by creating an error stack?
At various locations we catch exceptions and translate them into other exceptions. Would it be helpfull, if we'd create a simple stack of error strings in class Exception? So we could store and propagate the old Exceptions asString and/or asUserString. Something like this: Failed to create repository. -Reason: Failed to parse some file -Reason: Failed to provide some file -Reason: File not found But it's only worth the efford, if the UI is willing to display such multiline stacklike error messages. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dňa Po 18. Jún 2007 14:06 Michael Andres napísal:
At various locations we catch exceptions and translate them into other exceptions.
Would it be helpfull, if we'd create a simple stack of error strings in class Exception? So we could store and propagate the old Exceptions asString and/or asUserString.
Something like this:
Failed to create repository. -Reason: Failed to parse some file -Reason: Failed to provide some file -Reason: File not found
But it's only worth the efford, if the UI is willing to display such multiline stacklike error messages.
How should UI report this? Typically, user is interested in 1 and last message of the stack (reason & the overall result) Stano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dne pondělí 18 červen 2007 14:09 Stanislav Visnovsky napsal(a):
Dňa Po 18. Jún 2007 14:06 Michael Andres napísal:
At various locations we catch exceptions and translate them into other exceptions.
Would it be helpfull, if we'd create a simple stack of error strings in class Exception? So we could store and propagate the old Exceptions asString and/or asUserString.
Something like this:
Failed to create repository. -Reason: Failed to parse some file -Reason: Failed to provide some file -Reason: File not found
But it's only worth the efford, if the UI is willing to display such multiline stacklike error messages.
How should UI report this? Typically, user is interested in 1 and last message of the stack (reason & the overall result)
If we don't want to get the whole stack, all we need is the bottom-most line. The application always knows that it wanted to create a repository and does not need to get this message from libzypp. Having the whole stack may help in case of bug reports without log (but eg. with a screenshot). Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz
On Mon, Jun 18, Stanislav Visnovsky wrote:
Something like this:
Failed to create repository. -Reason: Failed to parse some file -Reason: Failed to provide some file -Reason: File not found
But it's only worth the efford, if the UI is willing to display such multiline stacklike error messages.
How should UI report this? Typically, user is interested in 1 and last message
When you press detail. Instead of showing the exceptions awsUserString(), we could show them all in a list like form. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (3)
-
Jiri Srain
-
Michael Andres
-
Stanislav Visnovsky