Erlang -- Appendix A: Mnesia Error Messages

User's Guide
Reference Manual
Release Notes
PDF
Top

Mnesia
User's Guide
Version 4.7

Expand All
Contract All

Chapters

- Introduction
  - Top of chapter
  - About Mnesia
  - The Mnesia DataBase Management System (DBMS)
- Getting Started with Mnesia
  - Top of chapter
  - Starting Mnesia for the first time
  - An Introductory Example
- Building A Mnesia Database
  - Top of chapter
  - Defining a Schema
  - The Data Model
  - Starting Mnesia
  - Creating New Tables
- Transactions and Other Access Contexts
  - Top of chapter
  - Transaction Properties
  - Locking
  - Dirty Operations
  - Record Names versus Table Names
  - Activity Concept and Various Access Contexts
  - Nested transactions
  - Pattern Matching
  - Iteration
- Miscellaneous Mnesia Features
  - Top of chapter
  - Indexing
  - Distribution and Fault Tolerance
  - Table Fragmentation
  - Local Content Tables
  - Disc-less Nodes
  - More Schema Management
  - Mnesia Event Handling
  - Debugging Mnesia Applications
  - Concurrent Processes in Mnesia
  - Prototyping
  - Object Based Programming with Mnesia
- Mnesia System Information
  - Top of chapter
  - Database Configuration Data
  - Core Dumps
  - Dumping Tables
  - Checkpoints
  - Files
  - Loading of Tables at Start-up
  - Recovery from Communication Failure
  - Recovery of Transactions
  - Backup, Fallback, and Disaster Recovery
- Combining Mnesia with SNMP
  - Top of chapter
  - Combining Mnesia and SNMP
- Appendix A: Mnesia Error Messages
  - Top of chapter
  - Errors in Mnesia
- Appendix B: The Backup Call Back Interface
  - Top of chapter
  - mnesia_backup callback behavior
- Appendix C: The Activity Access Call Back Interface
  - Top of chapter
  - mnesia_access callback behavior
- Appendix D: The Fragmented Table Hashing Call Back Interface
  - Top of chapter
  - mnesia_frag_hash callback behavior

# 8 Appendix A: Mnesia Error Messages

Whenever an operation returns an error in Mnesia, a description of the error is available. For example, the functions mnesia:transaction(Fun), or mnesia:create_table(N,L) may return the tuple {aborted, Reason}, where Reason is a term describing the error. The following function is used to retrieve more detailed information about the error:

- mnesia:error_description(Error)

### 8.1 Errors in Mnesia

The following is a list of valid errors in Mnesia.

- badarg. Bad or invalid argument, possibly bad type.
- no_transaction. Operation not allowed outside transactions.
- combine_error. Table options were illegally combined.
- bad_index. Index already exists, or was out of bounds.
- already_exists. Schema option to be activated is already on.
- index_exists. Some operations cannot be performed on tables with an index.
- no_exists.; Tried to perform operation on non-existing (non-alive) item.
- system_limit.; A system limit was exhausted.
- mnesia_down. A transaction involves records on a remote node which became unavailable before the transaction was completed. Record(s) are no longer available elsewhere in the network.
- not_a_db_node. A node was mentioned which does not exist in the schema.
- bad_type.; Bad type specified in argument.
- node_not_running. Node is not running.
- truncated_binary_file. Truncated binary in file.
- active. Some delete operations require that all active records are removed.
- illegal. Operation not supported on this record.

The following example illustrates a function which returns an error, and the method to retrieve more detailed error information.

The function mnesia:create_table(bar, [{attributes, 3.14}]) will return the tuple {aborted,Reason}, where Reason is the tuple {bad_type,bar,3.14000}.

The function mnesia:error_description(Reason), returns the term {"Bad type on some provided arguments",bar,3.14000} which is an error description suitable for display.