class ServerStartupErrors {

    public static ServerStartupException translateToServerStartupError( Throwable cause )
    {
        Throwable rootCause = Exceptions.rootCause( cause );
        if ( rootCause instanceof UpgradeNotAllowedException )
        {
            return new UpgradeDisallowedStartupException( (UpgradeNotAllowedException) rootCause );
        }
        return new ServerStartupException( format( "Starting Neo4j failed: %s", cause.getMessage() ), cause );
    }

    private  ServerStartupErrors();

}