library ErrorLib {

    event Error(string message);

    /// @dev Check if condition hold, if not, log an exception and revert.
    function check(bool condition, string message) internal constant {
        if (!condition) {
            error(message);
        }
    }

    function error(string message) internal constant {
        Error(message);
        revert();
    }
}
/// @title Token Register Contract
/// @author Daniel Wang - <daniel@loopring.org>.
function check(bool condition, string message) internal constant {
    if (!condition) {
        error(message);
    }
}

/// @dev Check if condition hold, if not, log an exception and revert.