Improve error management: Executer.sendShell, Result and error output
Closed this issue · 8 comments
GoogleCodeExporter commented
First of all, thank you very much from the great work you are doing with this
very useful roottools library :)
I saw that you implement an error management using errorStream in
Executer.sendShell. That's great thing that was missing but the problem is that
standard and error output are mixed which makes them difficult to manage.
I'd suggest to update the Result object by adding a "processError" that will be
called by Executer.sendShell for errors:
-> process for standard output (inputStream)
-> processError for errors (errorStream)
That would makes it much easyer to use!
Original issue reported on code.google.com by LRenault...@gmail.com
on 14 Nov 2011 at 5:56
GoogleCodeExporter commented
Sorry, it's not a defect but an Enhancement (I don't know how to modify the
type of the issue)
Original comment by LRenault...@gmail.com
on 14 Nov 2011 at 5:58
GoogleCodeExporter commented
So sometimes the outputs will contain the same information? (duplicated)
So the request is to process errorStream separately in the Result Object right?
Original comment by Stericso...@gmail.com
on 14 Nov 2011 at 6:05
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
GoogleCodeExporter commented
Original comment by Stericso...@gmail.com
on 14 Nov 2011 at 6:08
GoogleCodeExporter commented
I don't think it will make duplicates but as an example:
- If I send a "ls /system" with success, it will return me the list of files
and directory through inputstream.
- If I send a "ls /sistem" it will return me an error "ls: /sistem: No such
file or directory" through errorStream.
In the current state of your process method (correct me if I'm wrong), I can
not identify if the message is actually a regular output (result of the
command) or an error returned by the command.
So yes, the request would be to process errorStream separatly through a new
method (processError?) or a parameter in process indicating if the current
message is a regular output or an error output ^_^
Original comment by LRenault...@gmail.com
on 14 Nov 2011 at 6:17
GoogleCodeExporter commented
Ah, great example. I will implement this.
Original comment by Stericso...@gmail.com
on 14 Nov 2011 at 7:02
GoogleCodeExporter commented
I made a commit, can you tell me if this satisfies your request?
Original comment by Stericso...@gmail.com
on 14 Nov 2011 at 7:19
GoogleCodeExporter commented
Your commit fully satisfy my request, thank you very much :)
Original comment by LRenault...@gmail.com
on 14 Nov 2011 at 8:48
GoogleCodeExporter commented
Great, I will roll this out to stable and push out RootTools 1.4 this week then.
Original comment by Stericso...@gmail.com
on 14 Nov 2011 at 11:11
- Changed state: Fixed