public static OpenCycUnsupportedFeatureException fromThrowable ( String message , Throwable cause ) { return ( cause instanceof OpenCycUnsupportedFeatureException && Objects . equals ( message , cause . getMessage ( ) ) ) ? ( OpenCycUnsupportedFeatureException ) cause : new OpenCycUnsupportedFeatureException ( message , cause ) ; }
Converts a Throwable to a OpenCycUnsupportedFeatureException with the specified detail message . If the Throwable is a OpenCycUnsupportedFeatureException and if the Throwable s message is identical to the one supplied the Throwable will be passed through unmodified ; otherwise it will be wrapped in a new OpenCycUnsupportedFeatureException with the detail message .