PacketTooBigException.java
上传用户:sxlinghang
上传日期:2022-07-20
资源大小:1405k
文件大小:2k
源码类别:

数据库编程

开发平台:

Java

  1. /*
  2.    Copyright (C) 2002 MySQL AB
  3.       This program is free software; you can redistribute it and/or modify
  4.       it under the terms of the GNU General Public License as published by
  5.       the Free Software Foundation; either version 2 of the License, or
  6.       (at your option) any later version.
  7.       This program is distributed in the hope that it will be useful,
  8.       but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10.       GNU General Public License for more details.
  11.       You should have received a copy of the GNU General Public License
  12.       along with this program; if not, write to the Free Software
  13.       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  14.  */
  15. package com.mysql.jdbc;
  16. import java.sql.SQLException;
  17. /**
  18.  * Thrown when a packet that is too big for the server is
  19.  * created.
  20.  *
  21.  * @author Mark Matthews
  22.  */
  23. public class PacketTooBigException extends SQLException {
  24.     /**
  25.      * Creates a new PacketTooBigException object.
  26.      *
  27.      * @param packetSize DOCUMENT ME!
  28.      * @param maximumPacketSize DOCUMENT ME!
  29.      */
  30.     public PacketTooBigException(long packetSize, long maximumPacketSize) {
  31.         super("Packet for query is too large (" + packetSize + " > "
  32.             + maximumPacketSize + "). "
  33.             + "You can change this value on the server by setting the "
  34.             + "max_allowed_packet' variable.", SQLError.SQL_STATE_GENERAL_ERROR);
  35.     }
  36. }