Below is the list of changes that have just been committed into a local
mysqldoc repository of root. When root does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.2633 05/05/06 07:49:23 Mike.Hillyer@stripped +1 -0
Add MySqlException class, WIP
Docs/connector-net.xml
1.12 05/05/06 07:49:22 Mike.Hillyer@stripped +161 -0
Added mysqlexception class to architecture section, WIP
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: Mike.Hillyer
# Host: www.openwin.org
# Root: /home/mysqldoc/mysqldoc
--- 1.11/Docs/connector-net.xml 2005-05-06 05:53:50 -06:00
+++ 1.12/Docs/connector-net.xml 2005-05-06 07:49:22 -06:00
@@ -1510,6 +1510,167 @@
<!-- END DATAREADER CLASS -->
+ <sect1 id="connector-net-architecture-exception">
+
+ <title>The MySqlException Class</title>
+
+ <para>
+ This class is created whenever the MySql Data Provider encounters an
+ error generated from the server.
+ </para>
+
+ <para>
+ Any open connections are not automatically closed when an exception
+ is thrown. If the client application determines that the exception
+ is fatal, it should close any open MySqlDataReader objects or
+ MySqlConnection objects.
+ </para>
+
+ <sect2 id="connector-net-architecture-exception-properties">
+
+ <title>Properties</title>
+
+ <para>
+ The following properties are available:
+ </para>
+
+ <itemizedlist>
+
+ <listitem><para>
+ <literal>HelpLink</literal>: Gets or sets a link to the help file
+ associated with this exception.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>InnerException</literal>: Gets the Exception instance
+ that caused the current exception.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>IsFatal</literal>: True if this exception was fatal and
+ cause the closing of the connection, false otherwise.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>Message</literal>: Gets a message that describes the
+ current exception.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>Number</literal>: Gets a number that identifies the type
+ of error.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>Source</literal>: Gets or sets the name of the
+ application or the object that causes the error.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>StackTrace</literal>: Gets a string representation of the
+ frames on the call stack at the time the current exception was
+ thrown.
+ </para></listitem>
+
+ <listitem><para>
+ <literal>TargetSite</literal>: Gets the method that throws the
+ current exception.
+ </para></listitem>
+
+ </itemizedlist>
+
+ </sect2>
+
+<!-- END PROPERTIES -->
+
+ <sect2 id="connector-net-architecture-exception-methods">
+
+ <title>Methods</title>
+
+ <para>
+ The MySqlException class has no methods.
+ </para>
+
+ </sect2>
+
+<!-- END METHODS -->
+
+ <sect2 id="connector-net-architecture-exception-usage">
+
+ <title>Usage</title>
+
+ <para>
+ The following example generates a MySqlException due to a missing
+ server, and then displays the exception.
+ </para>
+
+ <sect3 id="connector-net-architecture-exception-usage-vb">
+
+ <title>VB.NET</title>
+
+ <para>
+ This example demonstrates how to use the MySqlException class with
+ VB.NET:
+ </para>
+
+<programlisting>
+Public Sub ShowException()
+ Dim mySelectQuery As String = "SELECT column1 FROM table1"
+ Dim myConnection As New MySqlConnection ("Data Source=localhost;Database=Sample;")
+ Dim myCommand As New MySqlCommand(mySelectQuery, myConnection)
+
+ Try
+ myCommand.Connection.Open()
+ Catch e As MySqlException
+ MessageBox.Show( e.Message )
+ End Try
+ End Sub
+ </programlisting>
+
+ </sect3>
+
+<!-- END VB -->
+
+ <sect3 id="connector-net-architecture-exception-usage-csharp">
+
+ <title>C#</title>
+
+ <para>
+ This example demonstrates how to use the MySqlException class with
+ C#:
+ </para>
+
+<programlisting>
+public void ShowException()
+{
+ string mySelectQuery = "SELECT column1 FROM table1";
+ MySqlConnection myConnection =
+ new MySqlConnection("Data Source=localhost;Database=Sample;");
+ MySqlCommand myCommand = new MySqlCommand(mySelectQuery,myConnection);
+
+ try
+ {
+ myCommand.Connection.Open();
+ }
+ catch (MySqlException e)
+ {
+ MessageBox.Show( e.Message );
+ }
+}
+ </programlisting>
+
+ </sect3>
+
+<!-- END CSHARP -->
+
+ </sect2>
+
+<!-- END USAGE -->
+
+ </sect1>
+
+<!-- END EXCEPTION -->
+
</chapter>
<!-- END ARCHITECTURE -->
| Thread |
|---|
| • bk commit - mysqldoc@docsrva tree (Mike.Hillyer:1.2633) | mhillyer | 6 May |