[rkward-cvs] SF.net SVN: rkward: [1760] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Mar 29 19:32:02 UTC 2007
Revision: 1760
http://svn.sourceforge.net/rkward/?rev=1760&view=rev
Author: tfry
Date: 2007-03-29 12:32:01 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Now that we can detect warnings, be sure to show them\!
Modified Paths:
--------------
trunk/rkward/rkward/misc/rkerrordialog.cpp
trunk/rkward/rkward/rbackend/rcommand.h
trunk/rkward/rkward/rbackend/rthread.cpp
trunk/rkward/rkward/windows/rkcommandlog.cpp
Modified: trunk/rkward/rkward/misc/rkerrordialog.cpp
===================================================================
--- trunk/rkward/rkward/misc/rkerrordialog.cpp 2007-03-29 18:16:30 UTC (rev 1759)
+++ trunk/rkward/rkward/misc/rkerrordialog.cpp 2007-03-29 19:32:01 UTC (rev 1760)
@@ -109,6 +109,10 @@
RKErrorDialog::newOutput (command->output ());
}
+ if (command->hasWarnings ()) {
+ newError (command->warnings ());
+ }
+
if (command->hasError ()) {
newError (command->error ());
}
Modified: trunk/rkward/rkward/rbackend/rcommand.h
===================================================================
--- trunk/rkward/rkward/rbackend/rcommand.h 2007-03-29 18:16:30 UTC (rev 1759)
+++ trunk/rkward/rkward/rbackend/rcommand.h 2007-03-29 19:32:01 UTC (rev 1760)
@@ -186,6 +186,8 @@
bool succeeded () { return ((status & WasTried) && !(status & Failed)); };
/** command has a string output retrievable via RCommand::output () */
bool hasOutput () { return (status & HasOutput); };
+/** command has a string output retrievable via RCommand::warnings () */
+ bool hasWarnings () { return (status & HasWarnings); };
/** command has an error-message retrievable via RCommand::error () */
bool hasError () { return (status & HasError); };
/** backend rejected command as being incomplete */
Modified: trunk/rkward/rkward/rbackend/rthread.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rthread.cpp 2007-03-29 18:16:30 UTC (rev 1759)
+++ trunk/rkward/rkward/rbackend/rthread.cpp 2007-03-29 19:32:01 UTC (rev 1760)
@@ -244,7 +244,6 @@
RK_TRACE (RBACKEND);
// TODO: output sometimes arrives in small chunks. Maybe it would be better to keep an internal buffer, and only append it to the output, when R_FlushConsole gets called?
-
if (!buf_length) return;
waitIfOutputPaused ();
@@ -283,6 +282,8 @@
current_command->output_list.append (current_output);
if (current_output->type == ROutput::Output) {
current_command->status |= RCommand::HasOutput;
+ } else if (current_output->type == ROutput::Warning) {
+ current_command->status |= RCommand::HasWarnings;
} else if (current_output->type == ROutput::Error) {
current_command->status |= RCommand::HasError;
}
Modified: trunk/rkward/rkward/windows/rkcommandlog.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandlog.cpp 2007-03-29 18:16:30 UTC (rev 1759)
+++ trunk/rkward/rkward/windows/rkcommandlog.cpp 2007-03-29 19:32:01 UTC (rev 1760)
@@ -157,7 +157,7 @@
}
// the case we have to deal with here, is that the command/output has not been shown, yet, but should, due to errors
- if (command->failed ()) {
+ if (command->hasWarnings() || command->failed()) {
if (RKSettingsModuleWatch::shouldShowError (command)) {
if (!RKSettingsModuleWatch::shouldShowInput (command)) addInputNoCheck (command);
if (!RKSettingsModuleWatch::shouldShowOutput (command)) {
@@ -166,7 +166,7 @@
addOutputNoCheck (command, *it);
}
}
- if (command->error ().isEmpty ()) {
+ if (command->failed () && command->error ().isEmpty ()) {
ROutput dummy_output;
dummy_output.type = ROutput::Error;
if (command->errorIncomplete ()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list