All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.shim.ledger.CompositeKeyFormatException Maven / Gradle / Ivy

There is a newer version: 2.5.3
Show newest version
/*
Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

package org.hyperledger.fabric.shim.ledger;

class CompositeKeyFormatException extends IllegalArgumentException {
    private static final long serialVersionUID = 1L;

    private CompositeKeyFormatException(String s) {
        super(s);
    }

    static CompositeKeyFormatException forInputString(String s, String group, int index) {
        return new CompositeKeyFormatException(String.format("For input string '%s', found 'U+%06X' at index %d.", s, group.codePointAt(0), index));
    }

    static CompositeKeyFormatException forSimpleKey(String key) {
        return new CompositeKeyFormatException(String.format("First character of the key [%s] contains a 'U+%06X' which is not allowed", key, CompositeKey.NAMESPACE.codePointAt(0)));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy