Class UnavailableFactoryException

    • Constructor Detail

      • UnavailableFactoryException

        public UnavailableFactoryException()
        Construct an exception with no detail message.
      • UnavailableFactoryException

        public UnavailableFactoryException​(String message)
        Construct an exception with the specified detail message.
        Parameters:
        message - the detail message. The detail message is saved for later retrieval by the Throwable​.get­Message() method.
      • UnavailableFactoryException

        public UnavailableFactoryException​(String message,
                                           Throwable cause)
        Construct an exception with the specified detail message and cause. The cause is the exception thrown in the underlying database (e.g. IOException or SQLException).
        Parameters:
        message - the detail message. The detail message is saved for later retrieval by the Throwable​.get­Message() method.
        cause - the cause for this exception. The cause is saved for later retrieval by the Throwable​.get­Cause() method.
    • Method Detail

      • setUnavailableFactory

        public void setUnavailableFactory​(AuthorityFactory factory)
        Specifies which factory is unavailable. This information can be provided when the exception occurred at some later stage after the factory construction (never inside the factory constructor), for example the first time that the factory tried to create an object.
        Example: EPSGFactory may have been successfully created with a valid Data­Source. But the call to Data­Source​.get­Connection() happens only later (the first time that user invokes a method requiring a search in the database). In case of failure to connect to the database, user may discover late that the factory is actually unavailable. User may want to be informed about which factory is unavailable, for example in order to remove it from the list of factory managed by Multi­Authorities­Factory.
        Parameters:
        factory - the factory which is unavailable.