public static void assertOpenAndActive(@NonNull String ws, @NonNull String errorMsg) throws ND4JWorkspaceException {
        if (!Nd4j.getWorkspaceManager().checkIfWorkspaceExistsAndActive(ws)) {
            throw new ND4JWorkspaceException(errorMsg);
        }
    }
public static void assertOpenAndActive ( @ NonNull String ws , @ NonNull String errorMsg ) throws ND4JWorkspaceException { if ( ! Nd4j . getWorkspaceManager ( ) . checkIfWorkspaceExistsAndActive ( ws ) ) { throw new ND4JWorkspaceException ( errorMsg ) ; } }
Assert that the specified workspace is open and active

@param ws       Name of the workspace to assert open and active
@param errorMsg Message to include in the exception, if required