mirror of https://github.com/apache/cloudstack.git
CS-15508: Print error text and code in ExceptionResponse
Description: Overriding toString() in ExceptionResponse for better logging.
This commit is contained in:
parent
9a669ab0bb
commit
67754525ef
|
|
@ -45,17 +45,22 @@ public class ExceptionResponse extends BaseResponse {
|
|||
public void setErrorText(String errorText) {
|
||||
this.errorText = errorText;
|
||||
}
|
||||
|
||||
public void addProxyObject(String tableName, Long id, String idFieldName) {
|
||||
idList.add(new IdentityProxy(tableName, id, idFieldName));
|
||||
return;
|
||||
}
|
||||
|
||||
public ArrayList<IdentityProxy> getIdProxyList() {
|
||||
return idList;
|
||||
}
|
||||
|
||||
public void setCSErrorCode(int cserrcode) {
|
||||
this.csErrorCode = cserrcode;
|
||||
}
|
||||
|
||||
public void addProxyObject(String tableName, Long id, String idFieldName) {
|
||||
idList.add(new IdentityProxy(tableName, id, idFieldName));
|
||||
return;
|
||||
}
|
||||
|
||||
public ArrayList<IdentityProxy> getIdProxyList() {
|
||||
return idList;
|
||||
}
|
||||
|
||||
public void setCSErrorCode(int cserrcode) {
|
||||
this.csErrorCode = cserrcode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("Error Code: " + errorCode + " Error text: " + errorText);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue