# HG changeset patch # User Ed Swartz # Date 1272391777 18000 # Node ID a672cbed30148afa80b30f3d2913ca2f6f9fd89a # Parent e1c5d5512540dc15552ed4e575531e576f44f919 Fix NPEs caused by logging null exception diff -r e1c5d5512540 -r a672cbed3014 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/BSFPlatform.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/BSFPlatform.java Tue Apr 27 10:40:15 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/BSFPlatform.java Tue Apr 27 13:09:37 2010 -0500 @@ -225,13 +225,14 @@ * @see com.nokia.carbide.cpp.epoc.engine.IViewRunnable#failedLoad(org.eclipse.core.runtime.CoreException) */ public Object failedLoad(CoreException exception) { - EpocEnginePlugin.log(exception); + if (exception != null) + EpocEnginePlugin.log(exception); messages.add(new Message(IMessage.ERROR, new MessageLocation(bsfPath), "BSFCatalog.BSFLoadError", //$NON-NLS-1$ MessageFormat.format( Messages.getString("BSFCatalog.BSFLoadError"), //$NON-NLS-1$ - new Object[] { exception.getLocalizedMessage() }) + new Object[] { exception != null ? exception.getLocalizedMessage() : "file not found" }) //$NON-NLS-1$ )); return null; } diff -r e1c5d5512540 -r a672cbed3014 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVPlatform.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVPlatform.java Tue Apr 27 10:40:15 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBVPlatform.java Tue Apr 27 13:09:37 2010 -0500 @@ -159,13 +159,14 @@ * @see com.nokia.carbide.cpp.epoc.engine.IViewRunnable#failedLoad(org.eclipse.core.runtime.CoreException) */ public Object failedLoad(CoreException exception) { - EpocEnginePlugin.log(exception); + if (exception != null) + EpocEnginePlugin.log(exception); messages.add(new Message(IMessage.ERROR, new MessageLocation(sbvPath), "SBVCatalog.SBVLoadError", //$NON-NLS-1$ MessageFormat.format( Messages.getString("SBVCatalog.SBVLoadError"), //$NON-NLS-1$ - new Object[] { exception.getLocalizedMessage() }) + new Object[] { exception != null ? exception.getLocalizedMessage() : "file not found" }) //$NON-NLS-1$ )); return null; }