View Source Tds.Error exception (Tds v2.3.1)

Defines the Tds.Error struct.

The struct has two fields:

  • :message: expected to be a string
  • :mssql: expected to be a keyword list with the fields line_number,
          `number` and `msg_text`

usage

Usage

iex> raise Tds.Error
** (Tds.Error) An error occured.

iex> raise Tds.Error, "some error"
** (Tds.Error) some error

iex> raise Tds.Error, line_number: 10, number: 8, msg_text: "some error"
** (Tds.Error) Line 10 (8): some error

Link to this section Summary

Link to this section Types

Specs

error_details() :: %{
  line_number: integer(),
  number: integer(),
  msg_text: String.t()
}

Specs

t() :: %Tds.Error{
  __exception__: true,
  message: String.t(),
  mssql: error_details()
}

Link to this section Functions

Link to this function

get_constraint_violations(arg1, message)

View Source