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

net.snowflake.client.core.AssertUtil Maven / Gradle / Ivy

There is a newer version: 3.18.0
Show newest version
/*
 * Copyright (c) 2012-2018 Snowflake Computing Inc. All rights reserved.
 */

package net.snowflake.client.core;

import net.snowflake.client.jdbc.ErrorCode;

/**
 * Created by jhuang on 1/27/16.
 */
public class AssertUtil
{
  /**
   * Assert the condition is true, otherwise throw an internal error
   * exception with the given message.
   *
   * @param condition
   * @param internalErrorMesg
   * @throws SFException
   */
  static void assertTrue(boolean condition, String internalErrorMesg)
      throws SFException
  {
    if (!condition)
      throw new SFException(ErrorCode.INTERNAL_ERROR, internalErrorMesg);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy