# Poco::Data::MySQL

# class MySQLException

Library: Data/MySQL
Package: MySQL
Header: Poco/Data/MySQL/MySQLException.h

## Description

Base class for all MySQL exceptions

## Inheritance

Direct Base Classes: Poco::Data::DataException

All Base Classes: Poco::Data::DataException, Poco::Exception, Poco::IOException, Poco::RuntimeException, std::exception

Known Derived Classes: ConnectionException, StatementException

## Member Summary

Member Functions: className, clone, name, operator =, rethrow

Inherited Functions: className, clone, code, displayText, extendedMessage, message, name, nested, operator =, rethrow, what

## Constructors

### MySQLException

MySQLException(
const MySQLException & exc
);

Creates MySQLException.

### MySQLException

MySQLException(
const std::string & msg,
int code = 0
);

Creates MySQLException.

## Destructor

### ~MySQLException

~MySQLException();

Destroys MySQLexception.

## Member Functions

### className

const char * className() const;

Returns the name of the exception class.

See also: Poco::Data::DataException::className()

### clone

Poco::Exception * clone() const;

Creates an exact copy of the exception.

The copy can later be thrown again by invoking rethrow() on it.

### name

const char * name() const;

Returns exception name.

See also: Poco::Data::DataException::name()

### operator =

MySQLException & operator = (
const MySQLException & exc
);

Assignment operator.

### rethrow

void rethrow() const;

(Re)Throws the exception.

This is useful for temporarily storing a copy of an exception (see clone()), then throwing it again.

See also: Poco::Data::DataException::rethrow()