1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
<TITLE>Appendix A: Mnesia Error Messages
</TITLE>
<SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
ALINK="#FF0000">
<CENTER>
<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif"></A>
</CENTER>
<A NAME="8"><!-- Empty --></A>
<H2>8 Appendix A: Mnesia Error Messages
</H2>
<P>Whenever an operation returns an error in Mnesia, a description
of the error is available. For example, the functions
<CODE>mnesia:transaction(Fun)</CODE>, or <CODE>mnesia:create_table(N,L)</CODE>
may return the tuple <CODE>{aborted, Reason}</CODE>, where <CODE>Reason</CODE>
is a term describing the error. The following function is used to
retrieve more detailed information about the error:
<P>
<UL>
<LI>
<CODE>mnesia:error_description(Error)</CODE>
</LI>
</UL>
<A NAME="8.1"><!-- Empty --></A>
<H3>8.1 Errors in Mnesia</H3>
<P>The following is a list of valid errors in Mnesia.
<P>
<UL>
<LI>
<CODE>badarg</CODE>. Bad or invalid argument, possibly bad type.
</LI>
<LI>
<CODE>no_transaction</CODE>. Operation not allowed outside transactions.
</LI>
<LI>
<CODE>combine_error</CODE>. Table options were illegally combined.
</LI>
<LI>
<CODE>bad_index</CODE>. Index already exists, or was out of bounds.
</LI>
<LI>
<CODE>already_exists</CODE>. Schema option to be activated is already on.
</LI>
<LI>
<CODE>index_exists</CODE>. Some operations cannot be performed on tables with an index.
</LI>
<LI>
<CODE>no_exists</CODE>.; Tried to perform operation on non-existing (non-alive) item.
</LI>
<LI>
<CODE>system_limit</CODE>.; A system limit was exhausted.
</LI>
<LI>
<CODE>mnesia_down</CODE>. 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.
</LI>
<LI>
<CODE>not_a_db_node</CODE>. A node was mentioned which does not exist in the schema.
</LI>
<LI>
<CODE>bad_type</CODE>.; Bad type specified in argument.
</LI>
<LI>
<CODE>node_not_running</CODE>. Node is not running.
</LI>
<LI>
<CODE>truncated_binary_file</CODE>. Truncated binary in file.
</LI>
<LI>
<CODE>active</CODE>. Some delete operations require that all active records are removed.
</LI>
<LI>
<CODE>illegal</CODE>. Operation not supported on this record.
</LI>
</UL>
<P>The following example illustrates a function which returns an error, and the method to retrieve more detailed error information.
<P>The function <CODE>mnesia:create_table(bar, [{attributes, 3.14}])</CODE> will return the tuple <CODE>{aborted,Reason}</CODE>, where <CODE>Reason</CODE> is the tuple
<CODE>{bad_type,bar,3.14000}</CODE>.
<P>The function <CODE>mnesia:error_description(Reason)</CODE>, returns the term
<CODE>{"Bad type on some provided arguments",bar,3.14000}</CODE> which is an error
description suitable
for display.
<CENTER>
<HR>
<SMALL>
Copyright © 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|