Class DynamicCodeLoadingException

  • All Implemented Interfaces:
    Serializable

    @Public
    public class DynamicCodeLoadingException
    extends FlinkException
    An exception that is thrown if the dynamic instantiation of code fails.

    This exception is supposed to "sum up" the zoo of exceptions typically thrown around dynamic code loading and instantiations:

    
     try {
         Class.forName(classname).asSubclass(TheType.class).newInstance();
     }
     catch (ClassNotFoundException | ClassCastException | InstantiationException | IllegalAccessException e) {
         throw new DynamicCodeLoadingException("Could not load and instantiate " + classname", e);
     }
     
    See Also:
    Serialized Form
    • Constructor Detail

      • DynamicCodeLoadingException

        public DynamicCodeLoadingException​(Throwable cause)
        Creates a new exception with the given cause.
        Parameters:
        cause - The exception that caused this exception
      • DynamicCodeLoadingException

        public DynamicCodeLoadingException​(String message,
                                           Throwable cause)
        Creates a new exception with the given message and cause.
        Parameters:
        message - The exception message
        cause - The exception that caused this exception