Catch and ignore exceptions caused by external program, let console proxy at least continue and give possibility for administrator to manually correct the route issue inside console proxy VM

This commit is contained in:
Kelven Yang 2011-01-26 13:58:10 -08:00
parent 6aae1adc1b
commit e932f23af2
1 changed files with 5 additions and 1 deletions

View File

@ -442,7 +442,11 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
// this method won't be called in high frequency, serialize access to script execution
synchronized(this) {
addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, address);
try {
addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, address);
} catch(Throwable e) {
s_logger.warn("Unexpected exception while adding internal route to " + address, e);
}
}
}
}