From 4ff4df3d6794fcc88a24da208281da24f1c576bd Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 17 Jul 2012 21:55:40 +0200 Subject: [PATCH] internal error in restoring component state should not block startup (PY-6998) --- .../impl/stores/ComponentStoreImpl.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ComponentStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ComponentStoreImpl.java index f78903eebd3a..f23f655d3a90 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ComponentStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ComponentStoreImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,16 +77,21 @@ abstract class ComponentStoreImpl implements IComponentStore { if (!isSerializable) return; - ApplicationManagerEx.getApplicationEx().runReadAction(new Runnable() { - public void run() { - if (component instanceof PersistentStateComponent) { - initPersistentComponent((PersistentStateComponent)component, false); + try { + ApplicationManagerEx.getApplicationEx().runReadAction(new Runnable() { + public void run() { + if (component instanceof PersistentStateComponent) { + initPersistentComponent((PersistentStateComponent)component, false); + } + else { + initJdomExternalizable((JDOMExternalizable)component); + } } - else { - initJdomExternalizable((JDOMExternalizable)component); - } - } - }); + }); + } + catch (Exception e) { + LOG.error(e); + } } public boolean isSaving() {