<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="120" MadCap:lastWidth="624" MadCap:disableMasterStylesheet="true" MadCap:tocPath="Advanced Features|Exception Handling" MadCap:InPreviewMode="false" MadCap:RuntimeFileType="Topic" MadCap:TargetType="WebHelp" MadCap:PathToHelpSystem="../../../" MadCap:HelpSystemFileName="index.xml" MadCap:SearchType="Stem"> <head><title>Exception Types </title> <script type="text/javascript">/* <![CDATA[ */ window.onload = function(){ var pathToFlash = $('html').attr('MadCap:PathToHelpSystem') + 'Content/Resources/Code/ZeroClipboard.swf'; ZeroClipboard.setMoviePath(pathToFlash); function bindToClipBord(element,content){ var clip = new ZeroClipboard.Client(); clip.setText(content); clip.glue(element); }; if(location.protocol==='file:'){ $('.copylink-marker').remove(); } else{ $('.copylink-marker').each(function(){ var text = $(this).parent().parent().children('.prettyprint').html(); $(this).hover(function(){ bindToClipBord(this,text); }, function(){}); }); } prettyPrint(); }; /* ]]> */</script> <link href="../../SkinSupport/MadCap.css" rel="stylesheet" /> <link href="../../Resources/Stylesheets/OnlineStyle.css" rel="stylesheet" /> <script src="../../Resources/Code/prettify.js"> </script> <script src="../../Resources/Code/lang-vb.js"> </script> <script src="../../Resources/Code/jquery.min.js"> </script> <script src="../../Resources/Code/ZeroClipboard.js"> </script> <script src="../../SkinSupport/MadCapAll.js" type="text/javascript"> </script> </head> <body> <p class="MCWebHelpFramesetLink" style="display: none;"><a href="../../../index_CSH.html#advanced_topics/exceptions/exception_types.htm" style="">Open topic with navigation</a> </p> <div class="MCBreadcrumbsBox"><span class="MCBreadcrumbsPrefix">You are here: </span><a class="MCBreadcrumbsLink" href="../../advanced_topics.htm">Advanced Features</a><span class="MCBreadcrumbsDivider"> > </span><a class="MCBreadcrumbsLink" href="../exceptions.htm">Exception Handling</a><span class="MCBreadcrumbsDivider"> > </span><span class="MCBreadcrumbs">Exception Types</span> </div> <p> <script type="text/javascript">/*<![CDATA[*/document.write('<a href="' + location.href +'">'); document.write("Direct Link"); document.write('</a>');/*]]>*/</script> </p> <p> </p> <h1><a name="kanchor97"></a>Exception Types</h1> <p>Using db4o you will have to deal with db4o-specific exceptions and system exceptions thrown directly out of db4o.</p> <p MadCap:conditions="Global.Primary:java" /> <p>db4o-exceptions are chained; you can get the cause of the exception using:</p> <p MadCap:conditions="Global.Primary:java" /> <p MadCap:conditions="Primary..NET,Primary.c#,Primary.All languages"> <p>c#: </p> <p><code>db4oException.Source;</code> </p> </p> <p MadCap:conditions="Global.Primary:cs" /> <p MadCap:conditions="Primary..NET,Primary.VB.NET,Primary.All languages"> <p>VB: </p> <p><code>db4oException.Source;</code> </p> </p> <p MadCap:conditions="Global.Primary:vb" /> <p>In order to see all db4o-specific exceptions you can examine the hierarchy of Db4oException class. Currently the following exceptions are available:</p> <p><b>Db4oException </b>- db4o exception wrapper: Exceptions occurring during internal processing will be proliferated to the client calling code encapsulated in an exception of this type.</p> <p><b>BackupInProgressException</b> - An exception to be thrown when another process is already busy with the backup. </p> <p><b>ConstraintViolationException </b>- Base class for all constraint violations.</p> <p><b>UniqueFieldValueConstraintViolationException</b> - An exception which will be thrown when the <a href="../unique_constraints.htm">unique constrain</a> is violated.</p> <p><b>DatabaseClosedException</b> - An exception to be thrown when the database was closed or failed to open. </p> <p><b>DatabaseFileLockedException</b> - This exception is thrown during any of db4o open calls if the database file is locked by another process. </p> <p><b>DatabaseMaximumSizeReachedException</b> - This exception is thrown if the database size is bigger than possible. <a href="../../tuning/performance_hints/increasing_the_maximum_database_file_size.htm" target="" title="" alt="" class="MCXref" xrefformat="See "{paratext}"">See "Increasing The Maximum Database File Size"</a></p> <p><b>DatabaseReadOnlyException</b> - This exception is thrown when a write operation was attempted on a database in read-only mode.</p><b>GlobalOnlyConfigException</b> - This exception is thrown when you try to change a setting on a open object container, but this setting cannot be changed at runtime.<p><b>IncompatibleFileFormatException</b> - An exception to be thrown when an open operation is attempted on a file(database), which format is incompatible with the current version of db4o.</p><p><b>InvalidIDException</b> - an exception to be thrown when an ID format supplied to #bind or #getById methods is incorrect. </p><p><b>InvalidPasswordException</b> - This exception is thrown when a client tries to connect to a server with the wrong password.</p><p><b>EventException</b> - This exception is thrown when a exception is thrown in a event callback. </p><p><b>OldFormatException</b> - An exception to be thrown when an old file format was detected and the file could not be open.</p><p><b>ReflectException</b> - An exception to be thrown when a class can not be stored or instantiated by current db4o reflector. </p><p><b>ReplicationConflictException</b> - an exception to be thrown when a conflict occurs and no ReplicationEventListener is specified.</p><script type="text/javascript" src="../../SkinSupport/MadCapBodyEnd.js"></script></body> </html>