org.springframework.social.evernote.api
Class EvernoteExceptionUtils

java.lang.Object
  extended by org.springframework.social.evernote.api.EvernoteExceptionUtils

public class EvernoteExceptionUtils
extends Object

Author:
Tadaya Tsuyukubo

Nested Class Summary
static interface EvernoteExceptionUtils.Operation<T>
          Callback interface for wrap(org.springframework.social.evernote.api.EvernoteExceptionUtils.Operation).
 
Constructor Summary
EvernoteExceptionUtils()
           
 
Method Summary
static EvernoteException convert(Exception ex)
          convert to EvernoteException
static
<T> T
wrap(EvernoteExceptionUtils.Operation<T> operation)
          Execute the given operation and wrap the thrown exception to EvernoteException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvernoteExceptionUtils

public EvernoteExceptionUtils()
Method Detail

convert

public static EvernoteException convert(Exception ex)
convert to EvernoteException

Parameters:
ex - original exception
Returns:
converted exception

wrap

public static <T> T wrap(EvernoteExceptionUtils.Operation<T> operation)
              throws EvernoteException
Execute the given operation and wrap the thrown exception to EvernoteException.

Type Parameters:
T - operation return type
Parameters:
operation - a callback operation
Returns:
return from callback operation
Throws:
EvernoteException - EvernoteException wrapping a thrown original exception


Copyright © 2014. All Rights Reserved.