public Object getFieldValue(_Fields field) { switch (field) { case ERROR_CODE: return getErrorCode(); case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
public CentralDogmaException deepCopy() { return new CentralDogmaException(this); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ERROR_CODE: if (value == null) { unsetErrorCode(); } else { setErrorCode((ErrorCode)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((String)value); } break; } }
/** * Performs a deep copy on <i>other</i>. */ public CentralDogmaException(CentralDogmaException other) { if (other.isSetErrorCode()) { this.errorCode = other.errorCode; } if (other.isSetMessage()) { this.message = other.message; } }
final CentralDogmaException cde = new CentralDogmaException(code); cde.setMessage(t.toString()); cde.initCause(t); return cde;
RequestContext.mapCurrent(Function.identity(), () -> null); final ErrorCode errorCode = e.getErrorCode(); switch (errorCode) { case BAD_REQUEST:
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof CentralDogmaException) return this.equals((CentralDogmaException)that); return false; }
final CentralDogmaException cde = new CentralDogmaException(code); cde.setMessage(t.toString()); cde.initCause(t); return cde;
RequestContext.mapCurrent(Function.identity(), () -> null); final ErrorCode errorCode = e.getErrorCode(); switch (errorCode) { case BAD_REQUEST:
/** * Performs a deep copy on <i>other</i>. */ public CentralDogmaException(CentralDogmaException other) { if (other.isSetErrorCode()) { this.errorCode = other.errorCode; } if (other.isSetMessage()) { this.message = other.message; } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof CentralDogmaException) return this.equals((CentralDogmaException)that); return false; }
final CentralDogmaException cde = new CentralDogmaException(code); cde.setMessage(t.toString()); cde.initCause(t); return cde;
RequestContext.mapCurrent(Function.identity(), () -> null); final ErrorCode errorCode = e.getErrorCode(); switch (errorCode) { case BAD_REQUEST:
public void setFieldValue(_Fields field, Object value) { switch (field) { case ERROR_CODE: if (value == null) { unsetErrorCode(); } else { setErrorCode((ErrorCode)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((String)value); } break; } }
public Object getFieldValue(_Fields field) { switch (field) { case ERROR_CODE: return getErrorCode(); case MESSAGE: return getMessage(); } throw new IllegalStateException(); }
public CentralDogmaException deepCopy() { return new CentralDogmaException(this); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ERROR_CODE: return isSetErrorCode(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); }
final String message = peeledCause.getMessage(); switch (((com.linecorp.centraldogma.internal.thrift.CentralDogmaException) peeledCause) .getErrorCode()) { case UNIMPLEMENTED: convertedCause = new CentralDogmaException("unimplemented", false);
private static void unimplemented(AsyncMethodCallback resultHandler) { resultHandler.onError(new CentralDogmaException(ErrorCode.UNIMPLEMENTED)); } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ERROR_CODE: return isSetErrorCode(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); }