<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- Appendix A: Mnesia Error Messages</title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/mnesia-4.4.13.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Mnesia</strong><br><strong>User's Guide</strong><br><small>Version 4.4.13</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p> <ul class="flipMenu" imagepath="../../../../doc/js/flipmenu"> <li id="no" title="Introduction" expanded="false">Introduction<ul> <li><a href="Mnesia_chap1.html"> Top of chapter </a></li> <li title="About Mnesia"><a href="Mnesia_chap1.html#id2264416">About Mnesia</a></li> <li title="The Mnesia DataBase Management System (DBMS)"><a href="Mnesia_chap1.html#id2259328">The Mnesia DataBase Management System (DBMS)</a></li> </ul> </li> <li id="no" title="Getting Started with Mnesia" expanded="false">Getting Started with Mnesia<ul> <li><a href="Mnesia_chap2.html"> Top of chapter </a></li> <li title="Starting Mnesia for the first time"><a href="Mnesia_chap2.html#id2259207">Starting Mnesia for the first time</a></li> <li title="An Introductory Example"><a href="Mnesia_chap2.html#id2259513">An Introductory Example</a></li> </ul> </li> <li id="no" title="Building A Mnesia Database" expanded="false">Building A Mnesia Database<ul> <li><a href="Mnesia_chap3.html"> Top of chapter </a></li> <li title="Defining a Schema"><a href="Mnesia_chap3.html#id2268730">Defining a Schema</a></li> <li title="The Data Model"><a href="Mnesia_chap3.html#id2269025">The Data Model</a></li> <li title="Starting Mnesia"><a href="Mnesia_chap3.html#id2269927">Starting Mnesia</a></li> <li title="Creating New Tables"><a href="Mnesia_chap3.html#id2270354">Creating New Tables</a></li> </ul> </li> <li id="no" title="Transactions and Other Access Contexts" expanded="false">Transactions and Other Access Contexts<ul> <li><a href="Mnesia_chap4.html"> Top of chapter </a></li> <li title="Transaction Properties"><a href="Mnesia_chap4.html#id2270987">Transaction Properties</a></li> <li title="Locking"><a href="Mnesia_chap4.html#id2271248">Locking</a></li> <li title="Dirty Operations"><a href="Mnesia_chap4.html#id2271791">Dirty Operations</a></li> <li title="Record Names versus Table Names"><a href="Mnesia_chap4.html#id2272219">Record Names versus Table Names</a></li> <li title="Activity Concept and Various Access Contexts"><a href="Mnesia_chap4.html#id2272338">Activity Concept and Various Access Contexts</a></li> <li title="Nested transactions"><a href="Mnesia_chap4.html#id2272678">Nested transactions</a></li> <li title="Pattern Matching"><a href="Mnesia_chap4.html#id2272772">Pattern Matching</a></li> <li title="Iteration"><a href="Mnesia_chap4.html#id2273172">Iteration</a></li> </ul> </li> <li id="no" title="Miscellaneous Mnesia Features" expanded="false">Miscellaneous Mnesia Features<ul> <li><a href="Mnesia_chap5.html"> Top of chapter </a></li> <li title="Indexing"><a href="Mnesia_chap5.html#id2273564">Indexing</a></li> <li title="Distribution and Fault Tolerance"><a href="Mnesia_chap5.html#id2273702">Distribution and Fault Tolerance</a></li> <li title="Table Fragmentation"><a href="Mnesia_chap5.html#id2273885">Table Fragmentation</a></li> <li title="Local Content Tables"><a href="Mnesia_chap5.html#id2274960">Local Content Tables</a></li> <li title="Disc-less Nodes"><a href="Mnesia_chap5.html#id2274992">Disc-less Nodes</a></li> <li title="More Schema Management"><a href="Mnesia_chap5.html#id2275179">More Schema Management</a></li> <li title="Mnesia Event Handling"><a href="Mnesia_chap5.html#id2275329">Mnesia Event Handling</a></li> <li title="Debugging Mnesia Applications"><a href="Mnesia_chap5.html#id2275937">Debugging Mnesia Applications</a></li> <li title="Concurrent Processes in Mnesia"><a href="Mnesia_chap5.html#id2276097">Concurrent Processes in Mnesia</a></li> <li title="Prototyping"><a href="Mnesia_chap5.html#id2276148">Prototyping</a></li> <li title="Object Based Programming with Mnesia"><a href="Mnesia_chap5.html#id2276292">Object Based Programming with Mnesia</a></li> </ul> </li> <li id="no" title="Mnesia System Information" expanded="false">Mnesia System Information<ul> <li><a href="Mnesia_chap7.html"> Top of chapter </a></li> <li title="Database Configuration Data"><a href="Mnesia_chap7.html#id2276572">Database Configuration Data</a></li> <li title="Core Dumps"><a href="Mnesia_chap7.html#id2276614">Core Dumps</a></li> <li title="Dumping Tables"><a href="Mnesia_chap7.html#id2276638">Dumping Tables</a></li> <li title="Checkpoints"><a href="Mnesia_chap7.html#id2276678">Checkpoints</a></li> <li title="Files"><a href="Mnesia_chap7.html#id2276957">Files</a></li> <li title="Loading of Tables at Start-up"><a href="Mnesia_chap7.html#id2277368">Loading of Tables at Start-up</a></li> <li title="Recovery from Communication Failure"><a href="Mnesia_chap7.html#id2277560">Recovery from Communication Failure</a></li> <li title="Recovery of Transactions"><a href="Mnesia_chap7.html#id2277693">Recovery of Transactions</a></li> <li title="Backup, Fallback, and Disaster Recovery"><a href="Mnesia_chap7.html#id2277864">Backup, Fallback, and Disaster Recovery</a></li> </ul> </li> <li id="no" title="Combining Mnesia with SNMP" expanded="false">Combining Mnesia with SNMP<ul> <li><a href="Mnesia_chap8.html"> Top of chapter </a></li> <li title="Combining Mnesia and SNMP "><a href="Mnesia_chap8.html#id2278809">Combining Mnesia and SNMP </a></li> </ul> </li> <li id="loadscrollpos" title="Appendix A: Mnesia Error Messages" expanded="true">Appendix A: Mnesia Error Messages<ul> <li><a href="Mnesia_App_A.html"> Top of chapter </a></li> <li title="Errors in Mnesia"><a href="Mnesia_App_A.html#id2278969">Errors in Mnesia</a></li> </ul> </li> <li id="no" title="Appendix B: The Backup Call Back Interface" expanded="false">Appendix B: The Backup Call Back Interface<ul> <li><a href="Mnesia_App_B.html"> Top of chapter </a></li> <li title="mnesia_backup callback behavior"><a href="Mnesia_App_B.html#id2279207">mnesia_backup callback behavior</a></li> </ul> </li> <li id="no" title="Appendix C: The Activity Access Call Back Interface" expanded="false">Appendix C: The Activity Access Call Back Interface<ul> <li><a href="Mnesia_App_C.html"> Top of chapter </a></li> <li title="mnesia_access callback behavior"><a href="Mnesia_App_C.html#id2279378">mnesia_access callback behavior</a></li> </ul> </li> <li id="no" title="Appendix D: The Fragmented Table Hashing Call Back Interface" expanded="false">Appendix D: The Fragmented Table Hashing Call Back Interface<ul> <li><a href="Mnesia_App_D.html"> Top of chapter </a></li> <li title="mnesia_frag_hash callback behavior"><a href="Mnesia_App_D.html#id2279587">mnesia_frag_hash callback behavior</a></li> </ul> </li> </ul> </div></div> <div id="content"> <div class="innertube"> <h1>8 Appendix A: Mnesia Error Messages</h1> <p>Whenever an operation returns an error in Mnesia, a description of the error is available. For example, the functions <span class="code">mnesia:transaction(Fun)</span>, or <span class="code">mnesia:create_table(N,L)</span> may return the tuple <span class="code">{aborted, Reason}</span>, where <span class="code">Reason</span> is a term describing the error. The following function is used to retrieve more detailed information about the error: </p> <ul> <li><span class="code">mnesia:error_description(Error)</span></li> </ul> <h3><a name="id2278969">8.1 Errors in Mnesia</a></h3> <p>The following is a list of valid errors in Mnesia.</p> <ul> <li> <span class="code">badarg</span>. Bad or invalid argument, possibly bad type. </li> <li> <span class="code">no_transaction</span>. Operation not allowed outside transactions. </li> <li> <span class="code">combine_error</span>. Table options were illegally combined. </li> <li> <span class="code">bad_index</span>. Index already exists, or was out of bounds. </li> <li> <span class="code">already_exists</span>. Schema option to be activated is already on. </li> <li> <span class="code">index_exists</span>. Some operations cannot be performed on tables with an index. </li> <li> <span class="code">no_exists</span>.; Tried to perform operation on non-existing (non-alive) item. </li> <li> <span class="code">system_limit</span>.; A system limit was exhausted. </li> <li> <span class="code">mnesia_down</span>. 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> <span class="code">not_a_db_node</span>. A node was mentioned which does not exist in the schema.</li> <li> <span class="code">bad_type</span>.; Bad type specified in argument.</li> <li> <span class="code">node_not_running</span>. Node is not running.</li> <li> <span class="code">truncated_binary_file</span>. Truncated binary in file.</li> <li> <span class="code">active</span>. Some delete operations require that all active records are removed.</li> <li> <span class="code">illegal</span>. 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> <p>The function <span class="code">mnesia:create_table(bar, [{attributes, 3.14}])</span> will return the tuple <span class="code">{aborted,Reason}</span>, where <span class="code">Reason</span> is the tuple <span class="code">{bad_type,bar,3.14000}</span>. </p> <p>The function <span class="code">mnesia:error_description(Reason)</span>, returns the term <span class="code">{"Bad type on some provided arguments",bar,3.14000}</span> which is an error description suitable for display.</p> </div> <div class="footer"> <hr> <p>Copyright © 1997-2010 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>