Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.eyrie.remctl.client;

Exception thrown when a remctl command returns a non-0 status code. This indicates an error in the command itself, and not with remctl.

If you don't consider a non-0 status codes to be an exceptional condition, then you can use the RemctlClient.executeAllowAnyStatus(java.lang.String[]) call to return a RemctlResponse with non-0 status codes

Author(s):
pradtke
public class RemctlStatusException extends RuntimeException {

    
    private static final long serialVersionUID = 1L;

    
The server response.
    private final RemctlResponse response;

    
Constructor for RemctlStatusException.

Parameters:
remctlResponse the server response that caused the exception
    public RemctlStatusException(final RemctlResponse remctlResponse) {
        super("Unexpected status. Expected 0, recieved '" + remctlResponse.getStatus() + "'. StdErr = "
                + remctlResponse.getStdErr());
        this. = remctlResponse;
    }

    

Returns:
the server response on stdout
See also:
RemctlResponse.getStdOut()
    public String getStdOut() {
        return this..getStdOut();
    }

    

Returns:
the server response on stderr
See also:
RemctlResponse.getStdErr()
    public String getStdErr() {
        return this..getStdErr();
    }

    

Returns:
the status code
See also:
RemctlResponse.getStatus()
    public Integer getStatus() {
        return this..getStatus();
    }
New to GrepCode? Check out our FAQ X