Index: command_buffer/service/cross/cmd_parser.cc |
=================================================================== |
--- command_buffer/service/cross/cmd_parser.cc (revision 30289) |
+++ command_buffer/service/cross/cmd_parser.cc (working copy) |
@@ -87,14 +87,18 @@ |
// It seems like we need an official way to turn on a debug mode and |
// get these errors. |
if (result != parse_error::kParseNoError) { |
- DLOG(INFO) |
- << "Error: " << result << " for Command " |
- << o3d::GetCommandName(static_cast<o3d::CommandId>(header.command)); |
+ ReportError(header.command, result); |
} |
get_ = (get + header.size) % entry_count_; |
return result; |
} |
+void CommandParser::ReportError(unsigned int command_id, |
+ parse_error::ParseError result) { |
+ DLOG(INFO) << "Error: " << result << " for Command " |
+ << handler_->GetCommandName(command_id); |
+} |
+ |
// Processes all the commands, while the buffer is not empty. Stop if an error |
// is encountered. |
parse_error::ParseError CommandParser::ProcessAllCommands() { |