CODENVY-570: Do not log InvalidRecipeException

We should not log exception if failed to create machine on InvalidRecipeException
6.19.x
Igor Vinokur 2016-07-12 11:55:53 +03:00
parent 7af41c8221
commit 5006a1040b
1 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import org.eclipse.che.api.core.util.LineConsumer;
import org.eclipse.che.api.core.util.WebsocketLineConsumer;
import org.eclipse.che.api.machine.server.dao.SnapshotDao;
import org.eclipse.che.api.machine.server.event.InstanceStateEvent;
import org.eclipse.che.api.machine.server.exception.InvalidRecipeException;
import org.eclipse.che.api.machine.server.exception.MachineException;
import org.eclipse.che.api.machine.server.exception.SnapshotException;
import org.eclipse.che.api.machine.server.exception.SourceNotFoundException;
@ -262,7 +263,9 @@ public class MachineManager {
machine,
machineLogger);
} catch (MachineException | NotFoundException e) {
LOG.error(e.getLocalizedMessage(), e);
if (!(e.getCause() instanceof InvalidRecipeException)) {
LOG.error(e.getLocalizedMessage(), e);
}
// todo what should we do in that case?
}
})),