public void run() { while (running) { try { update(); } catch (MVRuntimeException e) { Log.exception("ProximityTracker.Updater.run caught MVRuntimeException", e); } catch (Exception e) { Log.exception("ProximityTracker.Updater.run caught exception", e); } try { Thread.sleep(1000); } catch (InterruptedException e) { Log.warn("Updater: " + e); e.printStackTrace(); } } }
public void run() { try { lock.lock(); if (activated == false) { return; } try { if (mode == MSG_CMD_TYPE_GOTO) { gotoUpdate(); } else if (mode == MSG_CMD_TYPE_FOLLOW) { followUpdate(); } else if (mode == MSG_CMD_TYPE_STOP) { } else { Log.error("BaseBehavior.run: invalid mode"); } } catch (Exception e) { Log.exception("BaseBehavior.run caught exception raised during run for mode = " + mode, e); throw new RuntimeException(e); } } finally { lock.unlock(); } }