You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/11/26 19:58:43 UTC
[6/9] git commit: When reporting a failure,
include the "recent" Selenium server logs
When reporting a failure, include the "recent" Selenium server logs
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/be3d6eea
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/be3d6eea
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/be3d6eea
Branch: refs/heads/5.4-js-rewrite
Commit: be3d6eeae3dcce641fd43c5af379d85ac1d52ee6
Parents: 59c5d3d
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Mon Nov 26 10:29:43 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Mon Nov 26 10:29:43 2012 -0800
----------------------------------------------------------------------
.../test/ErrorReportingCommandProcessor.java | 44 ++++++++++-----
1 files changed, 29 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/be3d6eea/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReportingCommandProcessor.java
----------------------------------------------------------------------
diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReportingCommandProcessor.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReportingCommandProcessor.java
index 08fd181..9711cf4 100644
--- a/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReportingCommandProcessor.java
+++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReportingCommandProcessor.java
@@ -1,4 +1,4 @@
-// Copyright 2007, 2009 The Apache Software Foundation
+// Copyright 2007, 2009, 2012 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -55,10 +55,31 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
builder.append("): ");
builder.append(ex.toString());
+ try
+ {
+ String logs = delegate.getString("retrieveLastRemoteControlLogs", new String[]{});
+
+ if (logs != null && logs.length() > 0)
+ {
+
+ builder.append("\n");
+ builder.append(BORDER);
+
+ builder.append(logs);
+ }
+
+ } catch (Exception ex2)
+ {
+ // Skip the logs.
+ }
+
+
+ builder.append("\n");
builder.append(BORDER);
System.err.println(builder.toString());
+
errorReporter.writeErrorReport();
}
@@ -67,8 +88,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.doCommand(command, args);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(command, args, ex);
throw ex;
@@ -80,8 +100,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.getBoolean(string, strings);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(string, strings, ex);
throw ex;
@@ -93,8 +112,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.getBooleanArray(string, strings);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(string, strings, ex);
throw ex;
@@ -106,8 +124,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.getNumber(string, strings);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(string, strings, ex);
throw ex;
@@ -119,8 +136,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.getNumberArray(string, strings);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(string, strings, ex);
throw ex;
@@ -132,8 +148,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.getString(string, strings);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(string, strings, ex);
throw ex;
@@ -145,8 +160,7 @@ public class ErrorReportingCommandProcessor implements CommandProcessor
try
{
return delegate.getStringArray(string, strings);
- }
- catch (RuntimeException ex)
+ } catch (RuntimeException ex)
{
reportError(string, strings, ex);
throw ex;