This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 43d2257 Fix the exception output for admin commands (#1646)
43d2257 is described below
commit 43d22579fa78ae863ff16cd2e14b87113355243d
Author: Sijie Guo <[email protected]>
AuthorDate: Wed Apr 25 22:41:05 2018 -0700
Fix the exception output for admin commands (#1646)
---
.../src/main/java/org/apache/pulsar/admin/cli/CmdBase.java | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git
a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java
b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java
index 4601c89..bf8ce6c 100644
--- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java
+++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBase.java
@@ -72,17 +72,9 @@ public abstract class CmdBase {
System.err.println("Error connecting to: " +
admin.getServiceUrl());
return false;
} catch (PulsarAdminException e) {
- if (e.getCause() instanceof WebApplicationException) {
- WebApplicationException wae = (WebApplicationException)
e.getCause();
- System.err.println("Code: " +
wae.getResponse().getStatus());
- System.err.println("Header: " +
wae.getResponse().getHeaders());
- System.err.println("Location: " +
wae.getResponse().getLocation());
- System.err.println("Reason: " +
wae.getResponse().getEntity());
- } else {
- System.err.println(e.getHttpError());
- System.err.println();
- System.err.println("Reason: " + e.getMessage());
- }
+ System.err.println(e.getHttpError());
+ System.err.println();
+ System.err.println("Reason: " + e.getMessage());
return false;
} catch (Exception e) {
System.err.println("Got exception: " + e.getMessage());
--
To stop receiving notification emails like this one, please contact
[email protected].