1998-07-15 12:51:50 +08:00
|
|
|
<html>
|
|
|
|
<head><title>
|
1998-12-22 06:52:56 +08:00
|
|
|
HDF5/H5E API Specification
|
1998-07-15 12:51:50 +08:00
|
|
|
</title></head>
|
|
|
|
|
1998-12-22 06:52:56 +08:00
|
|
|
<body bgcolor="#FFFFFF">
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<center>
|
1998-12-22 06:52:56 +08:00
|
|
|
<table border=0 width=98%>
|
|
|
|
<tr><td valign=top align=left>
|
|
|
|
<a href="H5.intro.html">Introduction to HDF5</a> <br>
|
|
|
|
<a href="H5.user.html">HDF5 User Guide</a> <br>
|
|
|
|
<a href="index.html">Other HDF5 documents and links</a> <br>
|
|
|
|
<!--
|
|
|
|
<a href="Glossary.html">Glossary</a><br>
|
|
|
|
-->
|
|
|
|
</td>
|
|
|
|
<td valign=top align=right>
|
|
|
|
And in this document, the
|
|
|
|
<a href="RM_H5Front.html">HDF5 Reference Manual</a>
|
|
|
|
<br>
|
1998-07-15 12:51:50 +08:00
|
|
|
<a href="RM_H5.html">H5</a>
|
|
|
|
<a href="RM_H5A.html">H5A</a>
|
|
|
|
<a href="RM_H5D.html">H5D</a>
|
|
|
|
H5E
|
|
|
|
<a href="RM_H5F.html">H5F</a>
|
|
|
|
<a href="RM_H5G.html">H5G</a>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5I.html">H5I</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
<a href="RM_H5P.html">H5P</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<br>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5R.html">H5R</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
<a href="RM_H5S.html">H5S</a>
|
|
|
|
<a href="RM_H5T.html">H5T</a>
|
|
|
|
<a href="RM_H5Z.html">H5Z</a>
|
1998-09-12 00:00:43 +08:00
|
|
|
<a href="Tools.html">Tools</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<a href="PredefDTypes.html">Datatypes</a>
|
1998-12-22 06:52:56 +08:00
|
|
|
</td></tr>
|
|
|
|
</table>
|
1998-07-15 12:51:50 +08:00
|
|
|
</center>
|
|
|
|
<hr>
|
|
|
|
|
1998-12-22 06:52:56 +08:00
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
<center>
|
|
|
|
<h1>H5E: Error Interface</h1>
|
|
|
|
</center>
|
|
|
|
|
|
|
|
<h2>Error API Functions</h2>
|
|
|
|
|
|
|
|
These functions provide error handling capabilities in the HDF5 environment.
|
|
|
|
|
2000-07-18 03:14:30 +08:00
|
|
|
<p>
|
|
|
|
<strong>The C Interfaces:</strong>
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
<table border=0>
|
|
|
|
<tr><td valign=top>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Error-Clear">H5Eclear</a>
|
2000-11-14 00:35:49 +08:00
|
|
|
<li><a href="#Error-Print">H5Eprint</a>
|
|
|
|
<li><a href="#Error-Push">H5Epush</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
</ul>
|
|
|
|
</td><td> </td><td valign=top>
|
|
|
|
<ul>
|
2000-11-14 00:35:49 +08:00
|
|
|
<li><a href="#Error-SetAuto">H5Eset_auto</a>
|
|
|
|
<li><a href="#Error-GetAuto">H5Eget_auto</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
<li><a href="#Error-Walk">H5Ewalk</a>
|
|
|
|
</ul>
|
|
|
|
</td><td> </td><td valign=top>
|
|
|
|
<ul>
|
2000-11-14 00:35:49 +08:00
|
|
|
<li><a href="#Error-WalkCB">H5Ewalk_cb</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
<li><a href="#Error-GetMajor">H5Eget_major</a>
|
|
|
|
<li><a href="#Error-GetMinor">H5Eget_minor</a>
|
|
|
|
</ul>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
|
2000-07-18 03:14:30 +08:00
|
|
|
<p>
|
|
|
|
<strong>The FORTRAN90 Interfaces:</strong>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<font size=-1>
|
|
|
|
<i>In general, each FORTRAN90 subroutine performs exactly the same task
|
|
|
|
as the corresponding C function. The links below go to the C function
|
|
|
|
descriptions, which serve as general descriptions for both. A button,
|
|
|
|
under <strong>Non-C API(s)</strong> at the end of the C function description,
|
|
|
|
opens an external browser window displaying the FORTRAN90-specific
|
|
|
|
information. You will probably want to adjust the size and location of
|
|
|
|
this external window so that both browser windows are visible and to
|
|
|
|
facilitate moving easily between them.</i>
|
|
|
|
</font>
|
|
|
|
|
|
|
|
<table border=0>
|
|
|
|
<tr><td valign=top>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Error-SetAuto">h5eset_auto_f</a>
|
|
|
|
<!--<li><a href="#Error-GetAuto">h5eget_auto_f</a> -->
|
|
|
|
<li><a href="#Error-Clear">h5eclear_f</a>
|
|
|
|
</ul>
|
|
|
|
</td><td> </td><td valign=top>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Error-Print">h5eprint_f</a>
|
|
|
|
<!--<li><a href="#Error-Walk">h5ewalk_f</a> -->
|
|
|
|
<!--<li><a href="#Error-WalkCB">h5ewalk_cb_f</a> -->
|
|
|
|
</ul>
|
|
|
|
</td><td> </td><td valign=top>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Error-GetMajor">h5eget_major_f</a>
|
|
|
|
<li><a href="#Error-GetMinor">h5eget_minor_f</a>
|
|
|
|
</ul>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
<p>
|
|
|
|
The Error interface provides error handling in the form of a stack.
|
|
|
|
The <code>FUNC_ENTER()</code> macro clears the error stack whenever
|
|
|
|
an interface function is entered.
|
|
|
|
When an error is detected, an entry is pushed onto the stack.
|
|
|
|
As the functions unwind, additional entries are pushed onto the stack.
|
|
|
|
The API function will return some indication that an error occurred and
|
|
|
|
the application can print the error stack.
|
|
|
|
<p>
|
2002-01-17 02:45:29 +08:00
|
|
|
Certain API functions in the H5E package, such as <code>H5Eprint</code>,
|
1998-07-15 12:51:50 +08:00
|
|
|
do not clear the error stack. Otherwise, any function which
|
|
|
|
does not have an underscore immediately after the package name
|
2002-01-17 02:45:29 +08:00
|
|
|
will clear the error stack. For instance, <code>H5Fopen</code>
|
|
|
|
clears the error stack while <code>H5F_open</code> does not.
|
1998-07-15 12:51:50 +08:00
|
|
|
<p>
|
|
|
|
An error stack has a fixed maximum size.
|
|
|
|
If this size is exceeded then the stack will be truncated and only the
|
|
|
|
inner-most functions will have entries on the stack.
|
|
|
|
This is expected to be a rare condition.
|
|
|
|
<p>
|
|
|
|
Each thread has its own error stack, but since
|
|
|
|
multi-threading has not been added to the library yet, this
|
|
|
|
package maintains a single error stack. The error stack is
|
|
|
|
statically allocated to reduce the complexity of handling
|
|
|
|
errors within the H5E package.
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-SetAuto">H5Eset_auto</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Eset_auto</code>(<em>H5E_auto_t</em> <code>func</code>,
|
|
|
|
<em>void *</em><code>client_data</code>
|
|
|
|
)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Turns automatic error printing on or off.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Eset_auto</code> turns on or off automatic printing of
|
|
|
|
errors. When turned on (non-null <code>func</code> pointer),
|
|
|
|
any API function which returns an error indication will
|
|
|
|
first call <code>func</code>, passing it <code>client_data</code>
|
|
|
|
as an argument.
|
|
|
|
<p>
|
|
|
|
When the library is first initialized the auto printing function
|
2002-01-17 02:45:29 +08:00
|
|
|
is set to <code>H5Eprint</code> (cast appropriately) and
|
1998-07-15 12:51:50 +08:00
|
|
|
<code>client_data</code> is the standard error stream pointer,
|
|
|
|
<code>stderr</code>.
|
|
|
|
<p>
|
|
|
|
Automatic stack traversal is always in the
|
|
|
|
<code>H5E_WALK_DOWNWARD</code> direction.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>H5E_auto_t</em> <code>func</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Function to be called upon an error condition.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><em>void *</em><code>client_data</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Data passed to the error function.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
2000-07-18 03:14:30 +08:00
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5eset_auto_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-GetAuto">H5Eget_auto</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Eget_auto</code>(<em>H5E_auto_t *</em> <code>func</code>,
|
|
|
|
<em>void **</em><code>client_data</code>
|
|
|
|
)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Returns the current settings for the automatic error stack
|
|
|
|
traversal function and its data.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Eget_auto</code> returns the current settings for the
|
|
|
|
automatic error stack traversal function, <code>func</code>,
|
|
|
|
and its data, <code>client_data</code>. Either (or both)
|
|
|
|
arguments may be null in which case the value is not returned.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>H5E_auto_t *</em> <code>func</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>OUT: Current setting for the function to be called upon an
|
1998-07-15 12:51:50 +08:00
|
|
|
error condition.
|
|
|
|
<dt><em>void **</em><code>client_data</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>OUT: Current setting for the data passed to the error function.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
2000-07-18 03:14:30 +08:00
|
|
|
<!--
|
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5eget_auto_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
-->
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-Clear">H5Eclear</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Eclear</code>(<code>void</code>)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Clears the error stack for the current thread.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Eclear</code> clears the error stack for the current thread.
|
|
|
|
<p>
|
|
|
|
The stack is also cleared whenever an API function is called,
|
2002-01-17 02:45:29 +08:00
|
|
|
with certain exceptions (for instance, <code>H5Eprint</code>).
|
1998-07-15 12:51:50 +08:00
|
|
|
<p>
|
|
|
|
<code>H5Eclear</code> can fail if there are problems initializing
|
|
|
|
the library.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt>None
|
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
2000-07-18 03:14:30 +08:00
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5eclear_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
2000-11-14 00:35:49 +08:00
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-Push">H5Epush</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Epush</code>(
|
|
|
|
<em>const char *</em><code>file</code>,
|
|
|
|
<em>const char *</em><code>func</code>,
|
|
|
|
<em>unsigned</em> <code>line</code>,
|
|
|
|
<em>H5E_major_t</em> <code>maj_num</code>,
|
|
|
|
<em>H5E_minor_t</em> <code>min_num</code>,
|
|
|
|
<em>const char *</em><code>str</code>
|
|
|
|
)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Pushes new error record onto error stack.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Epush</code> pushes a new error record onto the
|
|
|
|
error stack for the current thread.
|
|
|
|
<p>
|
|
|
|
The error has major and minor numbers <code>maj_num</code> and
|
|
|
|
<code>min_num</code>,
|
|
|
|
the function <code>func</code> where the error was detected,
|
|
|
|
the name of the file <code>file</code> where the error was detected,
|
|
|
|
the line <code>line</code> within that file,
|
|
|
|
and an error description string <code>str</code>.
|
|
|
|
<p>
|
|
|
|
The function name, file name, and error description strings
|
|
|
|
must be statically allocated.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>const char *</em><code>file</code>,
|
|
|
|
<dd>IN: Name of the file in which the error was detected.
|
|
|
|
<dt><em>const char *</em><code>func</code>,
|
|
|
|
<dd>IN: Name of the function in which the error was detected.
|
|
|
|
<dt><em>unsigned</em> <code>line</code>,
|
|
|
|
<dd>IN: Line within the file at which the error was detected.
|
|
|
|
<dt><em>H5E_major_t</em> <code>maj_num</code>,
|
|
|
|
<dd>IN: Major error number.
|
|
|
|
<dt><em>H5E_minor_t</em> <code>min_num</code>,
|
|
|
|
<dd>IN: Minor error number.
|
|
|
|
<dt><em>const char *</em><code>str</code>
|
|
|
|
<dd>IN: Error description string.
|
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
|
|
|
<!--
|
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5epush_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
-->
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-Print">H5Eprint</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Eprint</code>(<em>FILE *</em> <code>stream</code>)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Prints the error stack in a default manner.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Eprint</code> prints the error stack on the specified
|
|
|
|
stream, <code>stream</code>.
|
|
|
|
Even if the error stack is empty, a one-line message will be printed:
|
|
|
|
<br>
|
|
|
|
<code>HDF5-DIAG: Error detected in thread 0.</code>
|
|
|
|
<p>
|
|
|
|
<code>H5Eprint</code> is a convenience function for
|
2002-01-17 02:45:29 +08:00
|
|
|
<code>H5Ewalk</code> with a function that prints error messages.
|
|
|
|
Users are encouraged to write their own more specific error handlers.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>FILE *</em> <code>stream</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: File pointer, or stderr if NULL.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
2000-07-18 03:14:30 +08:00
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5eprint_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-Walk">H5Ewalk</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Ewalk</code>(<em>H5E_direction_t</em> <code>direction</code>,
|
|
|
|
<em>H5E_walk_t</em> <code>func</code>,
|
|
|
|
<em>void *</em> <code>client_data</code>
|
|
|
|
)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Walks the error stack for the current thread, calling a specified
|
|
|
|
function.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Ewalk</code> walks the error stack for the current thread
|
|
|
|
and calls the specified function for each error along the way.
|
|
|
|
<p>
|
|
|
|
<code>direction</code> determines whether the stack is walked
|
|
|
|
from the inside out or the outside in.
|
|
|
|
A value of <code>H5E_WALK_UPWARD</code> means begin with the
|
|
|
|
most specific error and end at the API;
|
|
|
|
a value of <code>H5E_WALK_DOWNWARD</code> means to start at the
|
|
|
|
API and end at the inner-most function where the error was first
|
|
|
|
detected.
|
|
|
|
<p>
|
|
|
|
<code>func</code> will be called for each error in the error stack.
|
|
|
|
Its arguments will include an index number (beginning at zero
|
|
|
|
regardless of stack traversal direction), an error stack entry,
|
|
|
|
and the <code>client_data</code> pointer passed to
|
|
|
|
<code>H5E_print</code>.
|
2000-04-08 03:38:42 +08:00
|
|
|
The <code>H5E_walk_t</code> prototype is as follows:
|
|
|
|
<dir>
|
|
|
|
<p>
|
|
|
|
<code>typedef</code> <em>herr_t</em> <code>(*H5E_walk_t)(</code><em>int</em> <code>n,</code>
|
|
|
|
<em>H5E_error_t *</em><code>err_desc,</code>
|
|
|
|
<em>void *</em><code>client_data)</code>
|
|
|
|
<p>
|
|
|
|
where the parameters have the following meanings:
|
|
|
|
<dl>
|
|
|
|
<dt><em>int</em> <code>n</code>
|
|
|
|
<dd>Indexed position of the error in the stack.
|
|
|
|
<dt><em>H5E_error_t *</em><code>err_desc</code>
|
|
|
|
<dd>Pointer to a data structure describing the error.
|
|
|
|
<em>(This structure is currently described only in the
|
|
|
|
source code file </em><code>hdf5/src/H5Epublic.h</code><em>.
|
|
|
|
That file also contains the definitive list of major
|
|
|
|
and minor error codes. That information will
|
|
|
|
eventually be presented as an appendix to this
|
|
|
|
<cite>Reference Manual</cite>.)</em>
|
|
|
|
<dt><em>void *</em><code>client_data</code>
|
|
|
|
<dd>Pointer to client data in the format expected by
|
|
|
|
the user-defined function.
|
|
|
|
</dl>
|
|
|
|
</dir>
|
1998-07-15 12:51:50 +08:00
|
|
|
<p>
|
|
|
|
<code>H5Ewalk</code> can fail if there are problems initializing
|
|
|
|
the library.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>H5E_direction_t</em> <code>direction</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Direction in which the error stack is to be walked.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><em>H5E_walk_t</em> <code>func</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Function to be called for each error encountered.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><em>void *</em> <code>client_data</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Data to be passed with <code>func</code>.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
2000-07-18 03:14:30 +08:00
|
|
|
<!--
|
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5ewalk_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
-->
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-WalkCB">H5Ewalk_cb</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Ewalk_cb</code>(<em>int</em> <code>n</code>,
|
|
|
|
<em>H5E_error_t *</em><code>err_desc</code>,
|
|
|
|
<em>void</em> <code>*client_data</code>
|
|
|
|
)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Default error stack traversal callback function
|
|
|
|
that prints error messages to the specified output stream.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd><code>H5Ewalk_cb</code> is a default error stack traversal callback
|
|
|
|
function that prints error messages to the specified output stream.
|
|
|
|
It is not meant to be called directly but rather as an
|
2002-01-17 02:45:29 +08:00
|
|
|
argument to the <code>H5Ewalk</code> function.
|
|
|
|
This function is called also by <code>H5Eprint</code>.
|
1998-07-15 12:51:50 +08:00
|
|
|
Application writers are encouraged to use this function as a
|
|
|
|
model for their own error stack walking functions.
|
|
|
|
<p>
|
|
|
|
<code>n</code> is a counter for how many times this function
|
|
|
|
has been called for this particular traversal of the stack.
|
|
|
|
It always begins at zero for the first error on the stack
|
|
|
|
(either the top or bottom error, or even both, depending on
|
|
|
|
the traversal direction and the size of the stack).
|
|
|
|
<p>
|
|
|
|
<code>err_desc</code> is an error description. It contains all the
|
|
|
|
information about a particular error.
|
|
|
|
<p>
|
|
|
|
<code>client_data</code> is the same pointer that was passed as the
|
2002-01-17 02:45:29 +08:00
|
|
|
<code>client_data</code> argument of <code>H5Ewalk</code>.
|
2002-05-02 06:33:50 +08:00
|
|
|
It is expected to be a file pointer (or stderr if NULL).
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>int</em> <code>n</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN/OUT: Number of times this function has been called
|
1998-07-15 12:51:50 +08:00
|
|
|
for this traversal of the stack.
|
|
|
|
<dt><em>H5E_error_t *</em><code>err_desc</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>OUT: Error description.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><em>void</em> <code>*client_data</code>
|
2002-05-02 06:33:50 +08:00
|
|
|
<dd>IN: A file pointer, or stderr if NULL.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
2000-07-18 03:14:30 +08:00
|
|
|
<!--
|
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5ewalk_cb_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
-->
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-GetMajor">H5Eget_major</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>const char *</em> <code>H5Eget_major</code>(<em>H5E_major_t</em> <code>n</code>)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Returns a character string describing an error specified by a
|
|
|
|
major error number.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd>Given a major error number, <code>H5Eget_major</code> returns a
|
|
|
|
constant character string that describes the error.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>H5E_major_t</em> <code>n</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Major error number.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
|
|
|
<dd> Returns a character string describing the error if successful.
|
|
|
|
Otherwise returns "Invalid major error number."
|
2000-07-18 03:14:30 +08:00
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5eget_major_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Error-GetMinor">H5Eget_minor</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>const char *</em> <code>H5Eget_minor</code>(<em>H5E_minor_t</em> <code>n</code>)
|
|
|
|
<dt><strong>Purpose:</strong>
|
|
|
|
<dd>Returns a character string describing an error specified by a
|
|
|
|
minor error number.
|
|
|
|
<dt><strong>Description:</strong>
|
|
|
|
<dd>Given a minor error number, <code>H5Eget_minor</code> returns a
|
|
|
|
constant character string that describes the error.
|
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>H5E_minor_t</em> <code>n</code>
|
2002-01-17 02:45:29 +08:00
|
|
|
<dd>IN: Minor error number.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
|
|
|
<dd> Returns a character string describing the error if successful.
|
|
|
|
Otherwise returns "Invalid minor error number."
|
2000-07-18 03:14:30 +08:00
|
|
|
<dt><strong>Non-C API(s):</strong>
|
|
|
|
<dd><a href="fortran/h5e_FORTRAN.html#h5eget_minor_f"
|
|
|
|
target="FortranWin"><img src="Graphics/FORTRAN.gif" border=0></a>
|
|
|
|
<!--
|
|
|
|
<img src="Graphics/Java.gif">
|
|
|
|
<img src="Graphics/C++.gif">
|
|
|
|
-->
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<center>
|
1998-12-22 06:52:56 +08:00
|
|
|
<table border=0 width=98%>
|
|
|
|
<tr><td valign=top align=left>
|
|
|
|
<a href="H5.intro.html">Introduction to HDF5</a> <br>
|
|
|
|
<a href="H5.user.html">HDF5 User Guide</a> <br>
|
|
|
|
<a href="index.html">Other HDF5 documents and links</a> <br>
|
|
|
|
<!--
|
|
|
|
<a href="Glossary.html">Glossary</a><br>
|
|
|
|
-->
|
|
|
|
</td>
|
|
|
|
<td valign=top align=right>
|
|
|
|
And in this document, the
|
|
|
|
<a href="RM_H5Front.html">HDF5 Reference Manual</a>
|
|
|
|
<br>
|
1998-07-15 12:51:50 +08:00
|
|
|
<a href="RM_H5.html">H5</a>
|
|
|
|
<a href="RM_H5A.html">H5A</a>
|
|
|
|
<a href="RM_H5D.html">H5D</a>
|
|
|
|
H5E
|
|
|
|
<a href="RM_H5F.html">H5F</a>
|
|
|
|
<a href="RM_H5G.html">H5G</a>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5I.html">H5I</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
<a href="RM_H5P.html">H5P</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<br>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5R.html">H5R</a>
|
1998-07-15 12:51:50 +08:00
|
|
|
<a href="RM_H5S.html">H5S</a>
|
|
|
|
<a href="RM_H5T.html">H5T</a>
|
|
|
|
<a href="RM_H5Z.html">H5Z</a>
|
1998-09-12 00:00:43 +08:00
|
|
|
<a href="Tools.html">Tools</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<a href="PredefDTypes.html">Datatypes</a>
|
1998-12-22 06:52:56 +08:00
|
|
|
</td></tr>
|
|
|
|
</table>
|
1998-07-15 12:51:50 +08:00
|
|
|
</center>
|
|
|
|
<hr>
|
|
|
|
|
1998-12-22 06:52:56 +08:00
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
<address>
|
|
|
|
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
|
|
|
|
|
|
|
|
<br>
|
2002-05-02 06:33:50 +08:00
|
|
|
Last modified: 1 February 2002
|
2000-07-18 03:14:30 +08:00
|
|
|
<br>
|
2001-04-19 06:03:09 +08:00
|
|
|
Describes HDF5 Release 1.5, Unreleased Development Branch
|
2001-04-19 05:50:43 +08:00
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|