public static KbException fromThrowable ( Throwable cause ) { return ( cause instanceof KbException ) ? ( KbException ) cause : new KbException ( cause ) ; }
Converts a Throwable to a KbException . If the Throwable is a KbException it will be passed through unmodified ; otherwise it will be wrapped in a new KbException .