[OmniFaces utilities] The
unwrap()method unwraps the nested causes of given exception as long as until it is not an instance of
ELException(MyFaces) and then return it. If the given exception is already not an instance of the mentioned types, then it will directly be returned. Or if the exception, unwrapped or not, does not have a nested cause anymore, then it will be returned.
You can easily understand how this method works after you check the unwrap(Throwable exception,Class<T> type).