Skip to content

Commit cebb974

Browse files
committed
Review fixes
1 parent 9a8b3da commit cebb974

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

js/Ice/customError/client.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ for (const name of names) {
2828
console.log(greeting);
2929
} catch (exception) {
3030
if (exception instanceof Ice.DispatchException) {
31-
const dispatchException = exception as Ice.DispatchException;
3231
console.log(
33-
`Failed to create a greeting for '${name}': DispatchException { message = '${dispatchException.message}', replyStatus = ${dispatchException.replyStatus} }`,
32+
`Failed to create a greeting for '${name}': DispatchException { message = '${exception.message}', replyStatus = ${exception.replyStatus} }`,
3433
);
3534
} else if (exception instanceof VisitorCenter.GreeterException) {
36-
const greeterException = exception as VisitorCenter.GreeterException;
3735
console.log(
38-
`Failed to create a greeting for '${name}': GreeterException { message = '${greeterException.errorMessage}', error = ${greeterException.error} }`,
36+
`Failed to create a greeting for '${name}': GreeterException { message = '${exception.errorMessage}', error = ${exception.error} }`,
3937
);
4038
} else {
4139
throw exception;

0 commit comments

Comments
 (0)