M
mike
Hi,
My idea is to change the update method to return a boolean. True if
myOperation ( in method) is ok and false otherwise.
I add a return statement after catch that returns true. Where shall I
put my return false? Since if something goes wrong an exception is
thrown using the error code ClearCase.ERROR_UNSPECIFIED in
ClearCase.error(). Will the method return in case of exception thrown
( my guess is no)?
br,
//mike
public void update(final String[] elements,
final String comment, final int flags,
final OperationListener operationListener) {
//Some other code for checking flags here.
try {
myOperation("update", options, elements, comment,
operationListener);
} catch (CcException cce) {
switch (cce.getErrorCode()) {
default:
ClearCase.error(ClearCase.ERROR_UNSPECIFIED);
break;
}
}
}
The method in ClearCase.error() contains:
ClearCaseError error = new ClearCaseError(code, message, throwable);
throw error;
My idea is to change the update method to return a boolean. True if
myOperation ( in method) is ok and false otherwise.
I add a return statement after catch that returns true. Where shall I
put my return false? Since if something goes wrong an exception is
thrown using the error code ClearCase.ERROR_UNSPECIFIED in
ClearCase.error(). Will the method return in case of exception thrown
( my guess is no)?
br,
//mike
public void update(final String[] elements,
final String comment, final int flags,
final OperationListener operationListener) {
//Some other code for checking flags here.
try {
myOperation("update", options, elements, comment,
operationListener);
} catch (CcException cce) {
switch (cce.getErrorCode()) {
default:
ClearCase.error(ClearCase.ERROR_UNSPECIFIED);
break;
}
}
}
The method in ClearCase.error() contains:
ClearCaseError error = new ClearCaseError(code, message, throwable);
throw error;