org.eclipse.emf.emfstore.internal.client.model.util
Class WorkspaceUtil

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.util.WorkspaceUtil

public final class WorkspaceUtil
extends Object

Workspace utility class.

Author:
koegel

Method Summary
static IResourceLogger getResourceLogger()
          Returns the resource logger.
static void handleException(Exception exception)
          Handles the given exception by wrapping it in a RuntimeException and propagating it to all registered exception handlers.
static void handleException(String errorMessage, Exception exception)
          Handles the given exception by wrapping it in a RuntimeException and propagating it to all registered exception handlers.
static void log(String message, Exception exception, int statusInt)
          Log a warning to the error log.
static void log(String message, int statusInt)
          Log a message.
static void logException(String message, Exception e)
          Log an exception to the error log.
static void logWarning(String message, Exception e)
          Log a warning to the error log.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResourceLogger

public static IResourceLogger getResourceLogger()
Returns the resource logger.

Returns:
the resource logger

logException

public static void logException(String message,
                                Exception e)
Log an exception to the error log.

Parameters:
message - the message
e - the exception

logWarning

public static void logWarning(String message,
                              Exception e)
Log a warning to the error log.

Parameters:
message - the message
e - the exception

log

public static void log(String message,
                       Exception exception,
                       int statusInt)
Log a warning to the error log.

Parameters:
message - the message
exception - the exception or null f not applicable
statusInt - the status constant as defined in IStatus

log

public static void log(String message,
                       int statusInt)
Log a message.

Parameters:
message - the message
statusInt - the status constant as defined in IStatus

handleException

public static void handleException(String errorMessage,
                                   Exception exception)
Handles the given exception by wrapping it in a RuntimeException and propagating it to all registered exception handlers. If no exception handler did handle the exception a the wrapped exception will be re-thrown.

Parameters:
errorMessage - the error message that should be used for propagating the exception
exception - the actual exception

handleException

public static void handleException(Exception exception)
Handles the given exception by wrapping it in a RuntimeException and propagating it to all registered exception handlers. If no exception handler did handle the exception a the wrapped exception will be re-thrown.

Parameters:
exception - the actual exception


Copyright © 2015. All Rights Reserved.