Class: Mysql2::Error

### Home Classes Methods

### In Files

- lib/mysql2/error.rb

### Parent

StandardError

### Methods

- ::new
- #sql_state=

### Class/Module Index

Quicksearch

- Mysql2
- Mysql2::Client
- Mysql2::EM
- Mysql2::EM::Client
- Mysql2::EM::Client::Watcher
- Mysql2::Error
- Mysql2::Result
- Mysql2::Util
- Object

No matching classes.

# Mysql2::Error

### Constants

ENCODE_OPTS
REPLACEMENT_CHAR

### Attributes

errno[RW]
error_number[RW]
server_version[W]
sql_state[R]

### Public Class Methods

new(msg, server_version=nil) click to toggle source

    # File lib/mysql2/error.rb, line 15
    def initialize(msg, server_version=nil)
      self.server_version = server_version

      super(clean_message(msg))
    end

### Public Instance Methods

sql_state=(state) click to toggle source

    # File lib/mysql2/error.rb, line 21
    def sql_state=(state)
      @sql_state = ''.respond_to?(:encode) ? state.encode(ENCODE_OPTS) : state
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.