public static Tag exception(@Nullable Throwable exception) {
        if (exception == null) {
            return EXCEPTION_NONE;
        }
        String simpleName = exception.getClass().getSimpleName();
        return Tag.of("exception", simpleName.isEmpty() ? exception.getClass().getName() : simpleName);
    }
public static Tag exception ( @ Nullable Throwable exception ) { if ( exception == null ) { return EXCEPTION_NONE ; } String simpleName = exception . getClass ( ) . getSimpleName ( ) ; return Tag . of ( "exception" , simpleName . isEmpty ( ) ? exception . getClass ( ) . getName ( ) : simpleName ) ; }
Creates a {@code exception} tag based on the {@link Class#getSimpleName() simple
name} of the class of the given {@code exception}.

@param exception the exception, may be {@code null}
@return the exception tag derived from the exception