mirror of
https://github.com/boostorg/exception.git
synced 2025-07-14 21:16:36 +02:00
Merging in changes trunk updates: adding standard error_info typedefs, updating the documentation.
[SVN r55094]
This commit is contained in:
64
doc/boost_exception_all_hpp.html
Normal file
64
doc/boost_exception_all_hpp.html
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/all.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/all.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre><span class="RenoIncludeSPAN">#include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_ptr_hpp.html">boost/exception_ptr.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp</a></span>></span></pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
||||||
|
</a><a href="tutorial_diagnostic_information.html">Diagnostic Information<br/>
|
||||||
|
</a><a href="tutorial_enable_error_info.html">Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -38,7 +38,7 @@ boost
|
|||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="current_exception_diagnostic_information.html">current_exception_diagnostic_information<br/>
|
</a><a href="current_exception_diagnostic_information.html">current_exception_diagnostic_information<br/>
|
||||||
</a><a href="diagnostic_information.html">diagnostic_information<br/>
|
</a><a href="diagnostic_information.html">diagnostic_information<br/>
|
||||||
</a><a href="synopsis.html">Synopsis<br/>
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
55
doc/boost_exception_errinfo_api_function_hpp.html
Normal file
55
doc/boost_exception_errinfo_api_function_hpp.html
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_api_function.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_api_function.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_api_function_,int> <span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
55
doc/boost_exception_errinfo_at_line_hpp.html
Normal file
55
doc/boost_exception_errinfo_at_line_hpp.html
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_at_line.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_at_line.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_at_line_,int> <span class="RenoLink"><a href="errinfo_at_line.html">errinfo_at_line</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
doc/boost_exception_errinfo_errno_hpp.html
Normal file
56
doc/boost_exception_errinfo_errno_hpp.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_errno.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_errno.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_errno_,int> <span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
doc/boost_exception_errinfo_file_handle_hpp.html
Normal file
56
doc/boost_exception_errinfo_file_handle_hpp.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_file_handle.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_file_handle.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class> class weak_ptr;
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_handle_,weak_ptr<FILE> > <span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
doc/boost_exception_errinfo_file_name_hpp.html
Normal file
56
doc/boost_exception_errinfo_file_name_hpp.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_file_name.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_file_name.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_name_,std::string> <span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
doc/boost_exception_errinfo_file_open_mode_hpp.html
Normal file
56
doc/boost_exception_errinfo_file_open_mode_hpp.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_file_open_mode.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_file_open_mode.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_open_mode_,std::string> <span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
doc/boost_exception_errinfo_type_info_name_hpp.html
Normal file
56
doc/boost_exception_errinfo_type_info_name_hpp.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>boost/exception/errinfo_type_info_name.hpp</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception/errinfo_type_info_name.hpp</h2>
|
||||||
|
</div>
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_type_info_name_,std::string> <span class="RenoLink"><a href="errinfo_type_info_name.html">errinfo_type_info_name</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -30,7 +30,14 @@ boost
|
|||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp<br/>
|
||||||
</a><a href="error_info.html">error_info<br/>
|
</a><a href="error_info.html">error_info<br/>
|
||||||
</a><a href="synopsis.html">Synopsis<br/>
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
</a></div>
|
</a></div>
|
||||||
|
@ -38,14 +38,14 @@ boost
|
|||||||
<span class="RenoIncludeSPAN">template <class Tag,class T>
|
<span class="RenoIncludeSPAN">template <class Tag,class T>
|
||||||
class <span class="RenoLink"><a href="error_info.html">error_info</a></span>;</span>
|
class <span class="RenoLink"><a href="error_info.html">error_info</a></span>;</span>
|
||||||
|
|
||||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_function,char const *> throw_function;
|
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct throw_function_,char const *> throw_function;
|
||||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_file,char const *> throw_file;
|
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct throw_file_,char const *> throw_file;
|
||||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_line,int> throw_line;</span>
|
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct throw_line_,int> throw_line;</span>
|
||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION<br/>
|
<div class="RenoPageList"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION<br/>
|
||||||
</a><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
</a><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
</a><a href="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
||||||
</a><a href="boost_exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
</a><a href="boost_exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
||||||
</a><a href="boost_exception_info_hpp.html">boost/exception/info.hpp<br/>
|
</a><a href="boost_exception_info_hpp.html">boost/exception/info.hpp<br/>
|
||||||
|
@ -32,7 +32,7 @@ boost
|
|||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="error_info.html">error_info<br/>
|
</a><a href="error_info.html">error_info<br/>
|
||||||
</a></div>
|
</a></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,21 +21,9 @@
|
|||||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception.hpp</h2>
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>boost/exception.hpp</h2>
|
||||||
</div>
|
</div>
|
||||||
<h3>Synopsis</h3>
|
<p>This header has been deprecated.</p>
|
||||||
<div class="RenoIncludeDIV"><pre><span class="RenoIncludeSPAN">#include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>>
|
<p>Please #include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>> instead.</p>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
</div><div class="RenoAutoDIV"></div>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp</a></span>>
|
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_ptr_hpp.html">boost/exception_ptr.hpp</a></span>></span></pre>
|
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
|
||||||
<h3>See Also:</h3>
|
|
||||||
<div class="RenoPageList"><a href="tutorial_diagnostic_information.html">Diagnostic Information<br/>
|
|
||||||
</a><a href="tutorial_enable_error_info.html">Integrating Boost Exception in Existing Exception Class Hierarchies<br/>
|
|
||||||
</a><a href="synopsis.html">Synopsis<br/>
|
|
||||||
</a></div>
|
|
||||||
</div>
|
|
||||||
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
@ -44,7 +44,7 @@ boost
|
|||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp<br/>
|
</a><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp<br/>
|
||||||
</a><a href="error_info.html">error_info<br/>
|
</a><a href="error_info.html">error_info<br/>
|
||||||
</a><a href="error_info_error_info.html">error_info::error_info<br/>
|
</a><a href="error_info_error_info.html">error_info::error_info<br/>
|
||||||
|
@ -37,7 +37,7 @@ boost
|
|||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="synopsis.html">Synopsis<br/>
|
</a><a href="synopsis.html">Synopsis<br/>
|
||||||
</a><a href="tuple_operator_shl.html">tuple/operator<<<br/>
|
</a><a href="tuple_operator_shl.html">tuple/operator<<<br/>
|
||||||
</a></div>
|
</a></div>
|
||||||
|
@ -48,7 +48,7 @@ boost
|
|||||||
}</pre>
|
}</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="copy_exception.html">copy_exception<br/>
|
</a><a href="copy_exception.html">copy_exception<br/>
|
||||||
</a><a href="current_exception.html">current_exception<br/>
|
</a><a href="current_exception.html">current_exception<br/>
|
||||||
</a><a href="exception_ptr.html">exception_ptr<br/>
|
</a><a href="exception_ptr.html">exception_ptr<br/>
|
||||||
|
@ -63,13 +63,13 @@ else return <unspecified-string-value>;</pre>
|
|||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="RenoIncludeDIV"><h4>Example:</h4>
|
<div class="RenoIncludeDIV"><h4>Example:</h4>
|
||||||
<p>this is a possible output from the <span class="RenoLink">diagnostic_information</span> function, as used in <i>libs/exception/example/example_io.cpp:</i></p>
|
<p>this is a possible output from the <span class="RenoLink">diagnostic_information</span> function, as used in <i>libs/exception/example/example_io.cpp:</i></p>
|
||||||
<pre>example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
|
<pre>example_io.cpp(70): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
|
||||||
Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error>
|
Dynamic exception type: class boost::exception_detail::clone_impl<struct fopen_error>
|
||||||
std::exception::what: example_io error
|
std::exception::what: example_io error
|
||||||
[struct tag_errno *] = 2, OS says "No such file or directory"
|
[struct boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>_ *] = fopen
|
||||||
[struct tag_file_name *] = tmp1.txt
|
[struct boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>_ *] = 2, "No such file or directory"
|
||||||
[struct tag_function *] = fopen
|
[struct boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>_ *] = tmp1.txt
|
||||||
[struct tag_open_mode *] = rb</pre>
|
[struct boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>_ *] = rb</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION<br/>
|
<div class="RenoPageList"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION<br/>
|
||||||
|
102
doc/errinfo_api_function.html
Normal file
102
doc/errinfo_api_function.html
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_api_function</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_api_function</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_api_function_,int> <span class="RenoLink">errinfo_api_function</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting the name of a relevant API function (which does not use exceptions to report errors) in exceptions deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
|
<h3>Example:</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_throw_exception_hpp.html">boost/throw_exception.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::<span class="RenoLink">errinfo_api_function</span>("fopen") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(file) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::<span class="RenoLink">errinfo_api_function</span>("fread") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>(f) );
|
||||||
|
return nr;
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp<br/>
|
||||||
|
</a><a href="frequently_asked_questions.html">Frequently Asked Questions<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
101
doc/errinfo_at_line.html
Normal file
101
doc/errinfo_at_line.html
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_at_line</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_at_line</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_at_line_,int> <span class="RenoLink">errinfo_at_line</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting a relevant text file line number, for example in parse error exceptions deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
|
<h3>Example:</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_throw_exception_hpp.html">boost/throw_exception.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fopen") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(file) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fread") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>(f) );
|
||||||
|
return nr;
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
103
doc/errinfo_errno.html
Normal file
103
doc/errinfo_errno.html
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_errno</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_errno</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_errno_,int> <span class="RenoLink">errinfo_errno</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting a relevant errno value in exceptions deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
|
<h3>Example:</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_throw_exception_hpp.html">boost/throw_exception.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fopen") <<
|
||||||
|
boost::<span class="RenoLink">errinfo_errno</span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(file) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fread") <<
|
||||||
|
boost::<span class="RenoLink">errinfo_errno</span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>(f) );
|
||||||
|
return nr;
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp<br/>
|
||||||
|
</a><a href="frequently_asked_questions.html">Frequently Asked Questions<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
102
doc/errinfo_file_handle.html
Normal file
102
doc/errinfo_file_handle.html
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_file_handle</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_file_handle</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class> class weak_ptr;
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_handle_,weak_ptr<FILE> > <span class="RenoLink">errinfo_file_handle</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting a relevant FILE pointer managed by a boost::shared_ptr<FILE> in exceptions deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
|
<h3>Example:</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_throw_exception_hpp.html">boost/throw_exception.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fopen") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(file) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fread") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink">errinfo_file_handle</span>(f) );
|
||||||
|
return nr;
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
103
doc/errinfo_file_name.html
Normal file
103
doc/errinfo_file_name.html
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_file_name</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_file_name</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_name_,std::string> <span class="RenoLink">errinfo_file_name</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting a relevant file name in exceptions deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
|
<h3>Example:</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_throw_exception_hpp.html">boost/throw_exception.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fopen") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink">errinfo_file_name</span>(file) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fread") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>(f) );
|
||||||
|
return nr;
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp<br/>
|
||||||
|
</a><a href="frequently_asked_questions.html">Frequently Asked Questions<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
103
doc/errinfo_file_open_mode.html
Normal file
103
doc/errinfo_file_open_mode.html
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_file_open_mode</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_file_open_mode</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_open_mode_,std::string> <span class="RenoLink">errinfo_file_open_mode</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting the string passed as a second argument to fopen in exceptions indicating fopen failures and deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
|
<h3>Example:</h3>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_throw_exception_hpp.html">boost/throw_exception.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fopen") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(file) <<
|
||||||
|
boost::<span class="RenoLink">errinfo_file_open_mode</span>(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
<span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span>(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>("fread") <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno) <<
|
||||||
|
boost::<span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>(f) );
|
||||||
|
return nr;
|
||||||
|
}</pre>
|
||||||
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp<br/>
|
||||||
|
</a><a href="frequently_asked_questions.html">Frequently Asked Questions<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
doc/errinfo_type_info_name.html
Normal file
56
doc/errinfo_type_info_name.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
||||||
|
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
||||||
|
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
|
||||||
|
<title>errinfo_type_info_name</title>
|
||||||
|
<link href='reno.css' type='text/css' rel='stylesheet'/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="body-0">
|
||||||
|
<div class="body-1">
|
||||||
|
<div class="body-2">
|
||||||
|
<div>
|
||||||
|
<div id="boost_logo">
|
||||||
|
<a href="http://www.boost.org"><img style="border:0" src="../../../boost.png" alt="Boost" width="277" height="86"/></a>
|
||||||
|
</div>
|
||||||
|
<h1>Boost Exception</h1>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>errinfo_type_info_name</h3>
|
||||||
|
</div>
|
||||||
|
<div class="RenoIncludeDIV"><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_type_info_name_,std::string> <span class="RenoLink">errinfo_type_info_name</span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div></div><p>This type is designed to be used as a standard <span class="RenoLink"><a href="error_info.html">error_info</a></span> instance for transporting strings returned by std::type_info::name in exceptions deriving from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> objects.</p>
|
||||||
|
</div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
|
<h3>See Also:</h3>
|
||||||
|
<div class="RenoPageList"><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp<br/>
|
||||||
|
</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. -->
|
||||||
|
<!-- Distributed under the Boost Software License, Version 1.0. (See accompanying -->
|
||||||
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
|
<div id="footer">
|
||||||
|
<p> </p>
|
||||||
|
<hr/>
|
||||||
|
<p>
|
||||||
|
<a class="logo" href="http://jigsaw.w3.org/css-validator/check/referer"><img class="logo_pic" src="valid-css.png" alt="Valid CSS" height="31" width="88"/></a>
|
||||||
|
<a class="logo" href="http://validator.w3.org/check?uri=referer"><img class="logo_pic" src="valid-xhtml.png" alt="Valid XHTML 1.0" height="31" width="88"/></a>
|
||||||
|
<small>Copyright (c) 2006-2009 by Emil Dotchevski and Reverge Studios, Inc.<br/>
|
||||||
|
Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License, Version 1.0</a>.</small>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -59,6 +59,15 @@ typedef boost::<span class="RenoLink">error_info</span><struct tag_errno,int&
|
|||||||
if( int const * e=boost::<span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span><errno_info>(x) )
|
if( int const * e=boost::<span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span><errno_info>(x) )
|
||||||
....
|
....
|
||||||
}</pre>
|
}</pre>
|
||||||
|
<p>For convenience and uniformity, Boost Exception defines the following commonly used <span class="RenoLink">error_info</span> typedefs, ready for use with <span class="RenoLink"><a href="exception_operator_shl.html">operator<<</a></span>:</p>
|
||||||
|
<div class="RenoPageList"><a href="errinfo_api_function.html">errinfo_api_function<br/>
|
||||||
|
</a><a href="errinfo_at_line.html">errinfo_at_line<br/>
|
||||||
|
</a><a href="errinfo_errno.html">errinfo_errno<br/>
|
||||||
|
</a><a href="errinfo_file_handle.html">errinfo_file_handle<br/>
|
||||||
|
</a><a href="errinfo_file_name.html">errinfo_file_name<br/>
|
||||||
|
</a><a href="errinfo_file_open_mode.html">errinfo_file_open_mode<br/>
|
||||||
|
</a><a href="errinfo_type_info_name.html">errinfo_type_info_name<br/>
|
||||||
|
</a></div>
|
||||||
</div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||||
|
@ -51,6 +51,13 @@ boost
|
|||||||
</a><a href="exception_types_as_simple_semantic_tags.html">Exception Types as Simple Semantic Tags<br/>
|
</a><a href="exception_types_as_simple_semantic_tags.html">Exception Types as Simple Semantic Tags<br/>
|
||||||
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
</a><a href="enable_current_exception.html">enable_current_exception<br/>
|
||||||
</a><a href="enable_error_info.html">enable_error_info<br/>
|
</a><a href="enable_error_info.html">enable_error_info<br/>
|
||||||
|
</a><a href="errinfo_api_function.html">errinfo_api_function<br/>
|
||||||
|
</a><a href="errinfo_at_line.html">errinfo_at_line<br/>
|
||||||
|
</a><a href="errinfo_errno.html">errinfo_errno<br/>
|
||||||
|
</a><a href="errinfo_file_handle.html">errinfo_file_handle<br/>
|
||||||
|
</a><a href="errinfo_file_name.html">errinfo_file_name<br/>
|
||||||
|
</a><a href="errinfo_file_open_mode.html">errinfo_file_open_mode<br/>
|
||||||
|
</a><a href="errinfo_type_info_name.html">errinfo_type_info_name<br/>
|
||||||
</a><a href="error_info.html">error_info<br/>
|
</a><a href="error_info.html">error_info<br/>
|
||||||
</a><a href="exception_operator_shl.html">exception/operator<<<br/>
|
</a><a href="exception_operator_shl.html">exception/operator<<<br/>
|
||||||
</a><a href="exception_constructors.html">exception::exception<br/>
|
</a><a href="exception_constructors.html">exception::exception<br/>
|
||||||
|
@ -53,13 +53,13 @@ catch( ... )
|
|||||||
std::cerr << "OMG!!!";
|
std::cerr << "OMG!!!";
|
||||||
}</pre>
|
}</pre>
|
||||||
<p>This is a possible message it may display, the first line is only possible if <span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span> is used:</p>
|
<p>This is a possible message it may display, the first line is only possible if <span class="RenoLink"><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></span> is used:</p>
|
||||||
<pre>example_io.cpp(83): Throw in function void parse_file(const char *)
|
<pre>example_io.cpp(70): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
|
||||||
Dynamic exception type: class file_open_error
|
Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error>
|
||||||
std::exception::what: example_io error
|
std::exception::what: example_io error
|
||||||
[struct tag_errno_code *] = 2, OS says "No such file or directory"
|
[struct boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>_ *] = fopen
|
||||||
[struct tag_file_name *] = tmp1.xml
|
[struct boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>_ *] = 2, "No such file or directory"
|
||||||
[struct tag_function *] = fopen
|
[struct boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>_ *] = tmp1.txt
|
||||||
[struct tag_open_mode *] = rb</pre>
|
[struct boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>_ *] = rb</pre>
|
||||||
<h3>Why is boost::exception integrated in boost::throw_exception?</h3>
|
<h3>Why is boost::exception integrated in boost::throw_exception?</h3>
|
||||||
<p>The boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span> function predates the Boost Exception library and there has been some concern about its current behavior of injecting boost::<span class="RenoLink"><a href="exception.html">exception</a></span> as a base of any exception passed to boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>. Such concerns are dictated by the typical strict interpretation of a common principle in C and C++, that users only pay for features they actually use.</p>
|
<p>The boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span> function predates the Boost Exception library and there has been some concern about its current behavior of injecting boost::<span class="RenoLink"><a href="exception.html">exception</a></span> as a base of any exception passed to boost::<span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>. Such concerns are dictated by the typical strict interpretation of a common principle in C and C++, that users only pay for features they actually use.</p>
|
||||||
<p>The problem is that users of Boost Exception can't by themselves cause a library to throw types that derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, and without this they can't use any of the Boost Exception facilities.</p>
|
<p>The problem is that users of Boost Exception can't by themselves cause a library to throw types that derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, and without this they can't use any of the Boost Exception facilities.</p>
|
||||||
|
@ -21,11 +21,18 @@
|
|||||||
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
|
||||||
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>Headers</h2>
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>Headers</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="RenoPageList"><a href="boost_exception_hpp.html">boost/exception.hpp<br/>
|
<div class="RenoPageList"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp<br/>
|
||||||
</a><a href="boost_exception_current_exception_cast_hpp.html">boost/exception/current_exception_cast.hpp<br/>
|
</a><a href="boost_exception_current_exception_cast_hpp.html">boost/exception/current_exception_cast.hpp<br/>
|
||||||
</a><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp<br/>
|
</a><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp<br/>
|
||||||
</a><a href="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
</a><a href="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp<br/>
|
||||||
</a><a href="boost_exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
</a><a href="boost_exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp<br/>
|
||||||
|
</a><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp<br/>
|
||||||
</a><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp<br/>
|
</a><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp<br/>
|
||||||
</a><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp<br/>
|
</a><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp<br/>
|
||||||
</a><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp<br/>
|
</a><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp<br/>
|
||||||
|
@ -25,11 +25,18 @@
|
|||||||
<div class="RenoIndex"><h3>B</h3>
|
<div class="RenoIndex"><h3>B</h3>
|
||||||
<p><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></p>
|
<p><a href="BOOST_THROW_EXCEPTION.html">BOOST_THROW_EXCEPTION</a></p>
|
||||||
<h3>b</h3>
|
<h3>b</h3>
|
||||||
<p><a href="boost_exception_hpp.html">boost/exception.hpp</a></p>
|
<p><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></p>
|
||||||
<p><a href="boost_exception_current_exception_cast_hpp.html">boost/exception/current_exception_cast.hpp</a></p>
|
<p><a href="boost_exception_current_exception_cast_hpp.html">boost/exception/current_exception_cast.hpp</a></p>
|
||||||
<p><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></p>
|
<p><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></p>
|
||||||
<p><a href="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp</a></p>
|
<p><a href="boost_exception_enable_current_exception_hpp.html">boost/exception/enable_current_exception.hpp</a></p>
|
||||||
<p><a href="boost_exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></p>
|
<p><a href="boost_exception_enable_error_info_hpp.html">boost/exception/enable_error_info.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></p>
|
||||||
|
<p><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp</a></p>
|
||||||
<p><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></p>
|
<p><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></p>
|
||||||
<p><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp</a></p>
|
<p><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp</a></p>
|
||||||
<p><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp</a></p>
|
<p><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp</a></p>
|
||||||
@ -53,6 +60,13 @@
|
|||||||
<h3>e</h3>
|
<h3>e</h3>
|
||||||
<p><a href="enable_current_exception.html">enable_current_exception</a></p>
|
<p><a href="enable_current_exception.html">enable_current_exception</a></p>
|
||||||
<p><a href="enable_error_info.html">enable_error_info</a></p>
|
<p><a href="enable_error_info.html">enable_error_info</a></p>
|
||||||
|
<p><a href="errinfo_api_function.html">errinfo_api_function</a></p>
|
||||||
|
<p><a href="errinfo_at_line.html">errinfo_at_line</a></p>
|
||||||
|
<p><a href="errinfo_errno.html">errinfo_errno</a></p>
|
||||||
|
<p><a href="errinfo_file_handle.html">errinfo_file_handle</a></p>
|
||||||
|
<p><a href="errinfo_file_name.html">errinfo_file_name</a></p>
|
||||||
|
<p><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></p>
|
||||||
|
<p><a href="errinfo_type_info_name.html">errinfo_type_info_name</a></p>
|
||||||
<p><a href="error_info.html">error_info</a></p>
|
<p><a href="error_info.html">error_info</a></p>
|
||||||
<p><a href="error_info_error_info.html">error_info::error_info</a></p>
|
<p><a href="error_info_error_info.html">error_info::error_info</a></p>
|
||||||
<p><a href="error_info_value.html">error_info::value</a></p>
|
<p><a href="error_info_value.html">error_info::value</a></p>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -38,9 +38,9 @@ boost
|
|||||||
<span class="RenoIncludeSPAN">template <class Tag,class T>
|
<span class="RenoIncludeSPAN">template <class Tag,class T>
|
||||||
class <span class="RenoLink"><a href="error_info.html">error_info</a></span>;</span>
|
class <span class="RenoLink"><a href="error_info.html">error_info</a></span>;</span>
|
||||||
|
|
||||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_function,char const *> throw_function;
|
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct throw_function_,char const *> throw_function;
|
||||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_file,char const *> throw_file;
|
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct throw_file_,char const *> throw_file;
|
||||||
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_throw_line,int> throw_line;</span>
|
typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct throw_line_,int> throw_line;</span>
|
||||||
}</span></pre>
|
}</span></pre>
|
||||||
<p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>></p>
|
<p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>></p>
|
||||||
<pre><span class="RenoIncludeSPAN">namespace
|
<pre><span class="RenoIncludeSPAN">namespace
|
||||||
@ -172,14 +172,82 @@ boost
|
|||||||
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( E const & e );
|
void <span class="RenoLink"><a href="throw_exception.html">throw_exception</a></span>( E const & e );
|
||||||
#endif</span>
|
#endif</span>
|
||||||
}</div></span></pre>
|
}</div></span></pre>
|
||||||
<p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_hpp.html">boost/exception.hpp</a></span>></p>
|
<p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_api_function_,int> <span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_at_line_,int> <span class="RenoLink"><a href="errinfo_at_line.html">errinfo_at_line</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_errno_,int> <span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class> class weak_ptr;
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_handle_,weak_ptr<FILE> > <span class="RenoLink"><a href="errinfo_file_handle.html">errinfo_file_handle</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_name_,std::string> <span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_file_open_mode_,std::string> <span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp</a></span>></p>
|
||||||
|
<div class="RenoIncludeDIV"><pre>#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
<span class="RenoIncludeSPAN"> <span class="RenoIncludeSPAN">typedef <span class="RenoLink"><a href="error_info.html">error_info</a></span><struct errinfo_type_info_name_,std::string> <span class="RenoLink"><a href="errinfo_type_info_name.html">errinfo_type_info_name</a></span>;</span></span>
|
||||||
|
}</pre>
|
||||||
|
</div><p><span class="RenoEscape">#<!--<wiki>`#</wiki>--></span>include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>></p>
|
||||||
<div class="RenoIncludeDIV"><pre><span class="RenoIncludeSPAN">#include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>>
|
<div class="RenoIncludeDIV"><pre><span class="RenoIncludeSPAN">#include <<span class="RenoLink"><a href="boost_exception_diagnostic_information_hpp.html">boost/exception/diagnostic_information.hpp</a></span>>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
#include <<span class="RenoLink"><a href="boost_exception_error_info_hpp.html">boost/exception/error_info.hpp</a></span>>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
#include <<span class="RenoLink"><a href="boost_exception_exception_hpp.html">boost/exception/exception.hpp</a></span>>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp</a></span>>
|
#include <<span class="RenoLink"><a href="boost_exception_get_error_info_hpp.html">boost/exception/get_error_info.hpp</a></span>>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
#include <<span class="RenoLink"><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
||||||
#include <<span class="RenoLink"><a href="boost_exception_ptr_hpp.html">boost/exception_ptr.hpp</a></span>></span></pre>
|
#include <<span class="RenoLink"><a href="boost_exception_ptr_hpp.html">boost/exception_ptr.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_at_line_hpp.html">boost/exception/errinfo_at_line.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_handle_hpp.html">boost/exception/errinfo_file_handle.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_open_mode_hpp.html">boost/exception/errinfo_file_open_mode.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_type_info_name_hpp.html">boost/exception/errinfo_type_info_name.hpp</a></span>></span></pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<li>additional platform-specific diagnostic information.</li>
|
<li>additional platform-specific diagnostic information.</li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<p>The returned string is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:</p>
|
<p>The returned string is not presentable as a friendly user message, but because it is generated automatically, it is useful for debugging or logging purposes. Here is an example:</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_hpp.html">boost/exception.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
void f(); //throws unknown types that derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.
|
void f(); //throws unknown types that derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.
|
||||||
@ -47,13 +47,13 @@ g()
|
|||||||
}</pre>
|
}</pre>
|
||||||
<div class="RenoIncludeDIV"><h4>Example:</h4>
|
<div class="RenoIncludeDIV"><h4>Example:</h4>
|
||||||
<p>this is a possible output from the <span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span> function, as used in <i>libs/exception/example/example_io.cpp:</i></p>
|
<p>this is a possible output from the <span class="RenoLink"><a href="diagnostic_information.html">diagnostic_information</a></span> function, as used in <i>libs/exception/example/example_io.cpp:</i></p>
|
||||||
<pre>example_io.cpp(83): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
|
<pre>example_io.cpp(70): Throw in function class boost::shared_ptr<struct _iobuf> __cdecl my_fopen(const char *,const char *)
|
||||||
Dynamic exception type: class boost::exception_detail::clone_impl<class fopen_error>
|
Dynamic exception type: class boost::exception_detail::clone_impl<struct fopen_error>
|
||||||
std::exception::what: example_io error
|
std::exception::what: example_io error
|
||||||
[struct tag_errno *] = 2, OS says "No such file or directory"
|
[struct boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>_ *] = fopen
|
||||||
[struct tag_file_name *] = tmp1.txt
|
[struct boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>_ *] = 2, "No such file or directory"
|
||||||
[struct tag_function *] = fopen
|
[struct boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>_ *] = tmp1.txt
|
||||||
[struct tag_open_mode *] = rb</pre>
|
[struct boost::<span class="RenoLink"><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></span>_ *] = rb</pre>
|
||||||
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
</div></div><div class="RenoAutoDIV"><div class="RenoHR"><hr/></div>
|
||||||
<h3>See Also:</h3>
|
<h3>See Also:</h3>
|
||||||
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
<div class="RenoPageList"><a href="boost-exception.html">Boost Exception<br/>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>Integrating Boost Exception in Existing Exception Class Hierarchies</h2>
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>Integrating Boost Exception in Existing Exception Class Hierarchies</h2>
|
||||||
</div>
|
</div>
|
||||||
<p>Some exception hierarchies can not be modified to make boost::<span class="RenoLink"><a href="exception.html">exception</a></span> a base type. In this case, the <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span> function template can be used to make exception objects derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> anyway. Here is an example:</p>
|
<p>Some exception hierarchies can not be modified to make boost::<span class="RenoLink"><a href="exception.html">exception</a></span> a base type. In this case, the <span class="RenoLink"><a href="enable_error_info.html">enable_error_info</a></span> function template can be used to make exception objects derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span> anyway. Here is an example:</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_hpp.html">boost/exception.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_std_range_min,size_t> std_range_min;
|
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_std_range_min,size_t> std_range_min;
|
||||||
|
@ -28,19 +28,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>Here is how cloning can be enabled in a throw-expression (15.1):</p>
|
<p>Here is how cloning can be enabled in a throw-expression (15.1):</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_info_hpp.html">boost/exception/info.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_errno,int> errno_info;
|
struct file_read_error: virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
|
||||||
class file_read_error: public boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
|
||||||
|
|
||||||
void
|
void
|
||||||
file_read( FILE * f, void * buffer, size_t size )
|
file_read( FILE * f, void * buffer, size_t size )
|
||||||
{
|
{
|
||||||
if( size!=fread(buffer,1,size,f) )
|
if( size!=fread(buffer,1,size,f) )
|
||||||
throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(file_read_error()) <<
|
throw boost::<span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span>(file_read_error()) <<
|
||||||
errno_info(errno);
|
boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno);
|
||||||
}</pre>
|
}</pre>
|
||||||
<p>Of course, <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> may be used with any exception type; there is no requirement that it should derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
<p>Of course, <span class="RenoLink"><a href="enable_current_exception.html">enable_current_exception</a></span> may be used with any exception type; there is no requirement that it should derive from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
</div><div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>Cloning and Re-Throwing an Exception</h3>
|
</div><div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>Cloning and Re-Throwing an Exception</h3>
|
||||||
|
@ -29,24 +29,22 @@
|
|||||||
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>Adding of Arbitrary Data at the Point of the Throw</h3>
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h3>Adding of Arbitrary Data at the Point of the Throw</h3>
|
||||||
</div>
|
</div>
|
||||||
<p>The following example demonstrates how errno can be stored in exception objects using Boost Exception:</p>
|
<p>The following example demonstrates how errno can be stored in exception objects using Boost Exception:</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_hpp.html">boost/exception.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>>
|
||||||
#include <errno.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_errno,int> errno_info; //(1)
|
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_my_info,int> my_info; //(1)
|
||||||
|
|
||||||
class my_error: public boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, public std::exception { }; //(2)
|
struct my_error: virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span>, virtual std::exception { }; //(2)
|
||||||
|
|
||||||
void
|
void
|
||||||
f()
|
f()
|
||||||
{
|
{
|
||||||
throw my_error() << errno_info(errno); //(3)
|
throw my_error() << my_info(42); //(3)
|
||||||
}
|
}</pre>
|
||||||
</pre>
|
<p>First, we instantiate the <span class="RenoLink"><a href="error_info.html">error_info</a></span> template using a unique identifier -- tag_my_info, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects.</p>
|
||||||
<p>First, we instantiate the <span class="RenoLink"><a href="error_info.html">error_info</a></span> template using a unique identifier -- tag_errno, and the type of the info it identifies -- int. This provides compile-time type safety for the various values stored in exception objects.</p>
|
|
||||||
<p>Second, we define class my_error, which derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
<p>Second, we define class my_error, which derives from boost::<span class="RenoLink"><a href="exception.html">exception</a></span>.</p>
|
||||||
<p>Finally, (3) illustrates how the typedef from (1) can be used with <span class="RenoLink"><a href="exception_operator_shl.html">operator<<</a></span> to store values in exception objects at the point of the throw.</p>
|
<p>Finally, (3) illustrates how the typedef from (1) can be used with <span class="RenoLink"><a href="exception_operator_shl.html">operator<<</a></span> to store values in exception objects at the point of the throw.</p>
|
||||||
<p>The stored errno value can be recovered at a later time like this:</p>
|
<p>The stored my_info value can be recovered at a later time like this:</p>
|
||||||
<pre>// ...continued
|
<pre>// ...continued
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -59,8 +57,8 @@ g()
|
|||||||
catch(
|
catch(
|
||||||
my_error & x )
|
my_error & x )
|
||||||
{
|
{
|
||||||
if( int const * err=boost::<span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span><errno_info>(x) )
|
if( int const * mi=boost::<span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span><my_info>(x) )
|
||||||
std::cerr << "Error code: " << *err;
|
std::cerr << "My info: " << *mi;
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
<p>The <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span> function template is instantiated with the typedef from (1), and is passed an exception object of a polymorphic type. If the exception object contains the requested value, err will point to it; otherwise a null pointer is returned.</p>
|
<p>The <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span> function template is instantiated with the typedef from (1), and is passed an exception object of a polymorphic type. If the exception object contains the requested value, err will point to it; otherwise a null pointer is returned.</p>
|
||||||
@ -75,28 +73,25 @@ file_read( FILE * f, void * buffer, size_t size )
|
|||||||
}</pre>
|
}</pre>
|
||||||
<p>How can the file_read function pass a file name to the exception type constructor? All it has is a FILE handle.</p>
|
<p>How can the file_read function pass a file name to the exception type constructor? All it has is a FILE handle.</p>
|
||||||
<p>Using boost::<span class="RenoLink"><a href="exception.html">exception</a></span> allows us to free the file_read function from the burden of storing the file name in exceptions it throws:</p>
|
<p>Using boost::<span class="RenoLink"><a href="exception.html">exception</a></span> allows us to free the file_read function from the burden of storing the file name in exceptions it throws:</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_hpp.html">boost/exception.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_errno,int> errno_info;
|
struct file_read_error: virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
|
||||||
class file_read_error: public boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
|
||||||
|
|
||||||
void
|
void
|
||||||
file_read( FILE * f, void * buffer, size_t size )
|
file_read( FILE * f, void * buffer, size_t size )
|
||||||
{
|
{
|
||||||
if( size!=fread(buffer,1,size,f) )
|
if( size!=fread(buffer,1,size,f) )
|
||||||
throw file_read_error() << errno_info(errno);
|
throw file_read_error() << boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>(errno);
|
||||||
}</pre>
|
}</pre>
|
||||||
<p>If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally:</p>
|
<p>If file_read detects a failure, it throws an exception which contains the information that is available at the time, namely the errno. Other relevant information, such as the file name, can be added in a context higher up the call stack, where it is known naturally:</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_hpp.html">boost/exception.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_all_hpp.html">boost/exception/all.hpp</a></span>>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_file_name,std::string> file_name_info;
|
|
||||||
|
|
||||||
boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode );
|
boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode );
|
||||||
void file_read( FILE * f, void * buffer, size_t size );
|
void file_read( FILE * f, void * buffer, size_t size );
|
||||||
|
|
||||||
@ -113,7 +108,7 @@ parse_file( char const * file_name )
|
|||||||
catch(
|
catch(
|
||||||
boost::<span class="RenoLink"><a href="exception.html">exception</a></span> & e )
|
boost::<span class="RenoLink"><a href="exception.html">exception</a></span> & e )
|
||||||
{
|
{
|
||||||
e << file_name_info(file_name);
|
e << boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(file_name);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
@ -122,17 +117,17 @@ parse_file( char const * file_name )
|
|||||||
</div>
|
</div>
|
||||||
<p>The code snippet below demonstrates how boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span> can be used to bundle the name of the function that failed, together with the reported errno so that they can be added to exception objects more conveniently together:</p>
|
<p>The code snippet below demonstrates how boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span> can be used to bundle the name of the function that failed, together with the reported errno so that they can be added to exception objects more conveniently together:</p>
|
||||||
<pre>#include <<span class="RenoLink"><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
<pre>#include <<span class="RenoLink"><a href="boost_exception_info_tuple_hpp.html">boost/exception/info_tuple.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_file_name_hpp.html">boost/exception/errinfo_file_name.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_api_function_hpp.html">boost/exception/errinfo_api_function.hpp</a></span>>
|
||||||
|
#include <<span class="RenoLink"><a href="boost_exception_errinfo_errno_hpp.html">boost/exception/errinfo_errno.hpp</a></span>>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_file_name,std::string> file_name_info;
|
typedef boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span><boost::<span class="RenoLink"><a href="errinfo_api_function.html">errinfo_api_function</a></span>,boost::<span class="RenoLink"><a href="errinfo_errno.html">errinfo_errno</a></span>> clib_failure;
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_function,char const *> function_info;
|
|
||||||
typedef boost::<span class="RenoLink"><a href="error_info.html">error_info</a></span><struct tag_errno,int> errno_info;
|
|
||||||
typedef boost::tuple<function_info,errno_info> clib_failure;
|
|
||||||
|
|
||||||
class file_open_error: public boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
struct file_open_error: virtual boost::<span class="RenoLink"><a href="exception.html">exception</a></span> { };
|
||||||
|
|
||||||
boost::shared_ptr<FILE>
|
boost::shared_ptr<FILE>
|
||||||
file_open( char const * name, char const * mode )
|
file_open( char const * name, char const * mode )
|
||||||
@ -141,7 +136,7 @@ file_open( char const * name, char const * mode )
|
|||||||
return boost::shared_ptr<FILE>(f,fclose);
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
else
|
else
|
||||||
throw file_open_error() <<
|
throw file_open_error() <<
|
||||||
file_name_info(name) <<
|
boost::<span class="RenoLink"><a href="errinfo_file_name.html">errinfo_file_name</a></span>(name) <<
|
||||||
clib_failure("fopen",errno);
|
clib_failure("fopen",errno);
|
||||||
}</pre>
|
}</pre>
|
||||||
<p>Note that the members of a boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span> are stored separately in exception objects; they can only be retrieved individually, using <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>.</p>
|
<p>Note that the members of a boost::<span class="RenoLink"><a href="http://www.boost.org/libs/tuple/doc/tuple_users_guide.html">tuple</a></span> are stored separately in exception objects; they can only be retrieved individually, using <span class="RenoLink"><a href="get_error_info.html">get_error_info</a></span>.</p>
|
||||||
|
@ -22,6 +22,13 @@
|
|||||||
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>Types</h2>
|
<div class="RenoIncludeDIV"><div class="RenoAutoDIV"><h2>Types</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="RenoIndex"><h3>e</h3>
|
<div class="RenoIndex"><h3>e</h3>
|
||||||
|
<p><a href="errinfo_api_function.html">errinfo_api_function</a></p>
|
||||||
|
<p><a href="errinfo_at_line.html">errinfo_at_line</a></p>
|
||||||
|
<p><a href="errinfo_errno.html">errinfo_errno</a></p>
|
||||||
|
<p><a href="errinfo_file_handle.html">errinfo_file_handle</a></p>
|
||||||
|
<p><a href="errinfo_file_name.html">errinfo_file_name</a></p>
|
||||||
|
<p><a href="errinfo_file_open_mode.html">errinfo_file_open_mode</a></p>
|
||||||
|
<p><a href="errinfo_type_info_name.html">errinfo_type_info_name</a></p>
|
||||||
<p><a href="error_info.html">error_info</a></p>
|
<p><a href="error_info.html">error_info</a></p>
|
||||||
<p><a href="error_info_value_type.html">error_info::value_type</a></p>
|
<p><a href="error_info_value_type.html">error_info::value_type</a></p>
|
||||||
<p><a href="exception.html">exception</a></p>
|
<p><a href="exception.html">exception</a></p>
|
||||||
|
@ -13,3 +13,4 @@ obj cloning_2 : cloning_2.cpp : <threading>multi ;
|
|||||||
obj info_tuple : info_tuple.cpp ;
|
obj info_tuple : info_tuple.cpp ;
|
||||||
obj enable_error_info : enable_error_info.cpp ;
|
obj enable_error_info : enable_error_info.cpp ;
|
||||||
obj logging : logging.cpp ;
|
obj logging : logging.cpp ;
|
||||||
|
obj errinfos : errinfos.cpp ;
|
||||||
|
@ -6,17 +6,16 @@
|
|||||||
//This example shows how to enable cloning when throwing a boost::exception.
|
//This example shows how to enable cloning when throwing a boost::exception.
|
||||||
|
|
||||||
#include <boost/exception/info.hpp>
|
#include <boost/exception/info.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_errno,int> errno_info;
|
struct file_read_error: virtual boost::exception { };
|
||||||
|
|
||||||
class file_read_error: public boost::exception { };
|
|
||||||
|
|
||||||
void
|
void
|
||||||
file_read( FILE * f, void * buffer, size_t size )
|
file_read( FILE * f, void * buffer, size_t size )
|
||||||
{
|
{
|
||||||
if( size!=fread(buffer,1,size,f) )
|
if( size!=fread(buffer,1,size,f) )
|
||||||
throw boost::enable_current_exception(file_read_error()) <<
|
throw boost::enable_current_exception(file_read_error()) <<
|
||||||
errno_info(errno);
|
boost::errinfo_errno(errno);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//transporting of arbitrary data to the catch site, even for types
|
//transporting of arbitrary data to the catch site, even for types
|
||||||
//that do not derive from boost::exception.
|
//that do not derive from boost::exception.
|
||||||
|
|
||||||
#include <boost/exception.hpp>
|
#include <boost/exception/all.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_std_range_min,size_t> std_range_min;
|
typedef boost::error_info<struct tag_std_range_min,size_t> std_range_min;
|
||||||
|
53
example/errinfos.cpp
Normal file
53
example/errinfos.cpp
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
//This example demonstrates the intended use of various commonly used
|
||||||
|
//error_info typedefs provided by Boost Exception.
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
||||||
|
#include <boost/exception/errinfo_at_line.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_handle.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_open_mode.hpp>
|
||||||
|
#include <boost/exception/info.hpp>
|
||||||
|
#include <boost/throw_exception.hpp>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct error : virtual std::exception, virtual boost::exception { };
|
||||||
|
struct file_error : virtual error { };
|
||||||
|
struct file_open_error: virtual file_error { };
|
||||||
|
struct file_read_error: virtual file_error { };
|
||||||
|
|
||||||
|
boost::shared_ptr<FILE>
|
||||||
|
open_file( char const * file, char const * mode )
|
||||||
|
{
|
||||||
|
if( FILE * f=fopen(file,mode) )
|
||||||
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
|
else
|
||||||
|
BOOST_THROW_EXCEPTION(
|
||||||
|
file_open_error() <<
|
||||||
|
boost::errinfo_api_function("fopen") <<
|
||||||
|
boost::errinfo_errno(errno) <<
|
||||||
|
boost::errinfo_file_name(file) <<
|
||||||
|
boost::errinfo_file_open_mode(mode) );
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
read_file( boost::shared_ptr<FILE> const & f, void * buf, size_t size )
|
||||||
|
{
|
||||||
|
size_t nr=fread(buf,1,size,f.get());
|
||||||
|
if( ferror(f.get()) )
|
||||||
|
BOOST_THROW_EXCEPTION(
|
||||||
|
file_read_error() <<
|
||||||
|
boost::errinfo_api_function("fread") <<
|
||||||
|
boost::errinfo_errno(errno) <<
|
||||||
|
boost::errinfo_file_handle(f) );
|
||||||
|
return nr;
|
||||||
|
}
|
@ -6,18 +6,17 @@
|
|||||||
//This example shows how to add data to boost::exception objects at the
|
//This example shows how to add data to boost::exception objects at the
|
||||||
//point of the throw, and how to retrieve that data at the point of the catch.
|
//point of the throw, and how to retrieve that data at the point of the catch.
|
||||||
|
|
||||||
#include <boost/exception.hpp>
|
#include <boost/exception/all.hpp>
|
||||||
#include <errno.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_errno,int> errno_info; //(1)
|
typedef boost::error_info<struct tag_my_info,int> my_info; //(1)
|
||||||
|
|
||||||
class my_error: public boost::exception, public std::exception { }; //(2)
|
struct my_error: virtual boost::exception, virtual std::exception { }; //(2)
|
||||||
|
|
||||||
void
|
void
|
||||||
f()
|
f()
|
||||||
{
|
{
|
||||||
throw my_error() << errno_info(errno); //(3)
|
throw my_error() << my_info(42); //(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -30,7 +29,7 @@ g()
|
|||||||
catch(
|
catch(
|
||||||
my_error & x )
|
my_error & x )
|
||||||
{
|
{
|
||||||
if( int const * err=boost::get_error_info<errno_info>(x) )
|
if( int const * mi=boost::get_error_info<my_info>(x) )
|
||||||
std::cerr << "Error code: " << *err;
|
std::cerr << "My info: " << *mi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,28 +5,24 @@
|
|||||||
|
|
||||||
//This example shows how to add arbitrary data to active exception objects.
|
//This example shows how to add arbitrary data to active exception objects.
|
||||||
|
|
||||||
#include <boost/exception.hpp>
|
#include <boost/exception/all.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_errno,int> errno_info;
|
struct file_read_error: virtual boost::exception { };
|
||||||
|
|
||||||
class file_read_error: public boost::exception { };
|
|
||||||
|
|
||||||
void
|
void
|
||||||
file_read( FILE * f, void * buffer, size_t size )
|
file_read( FILE * f, void * buffer, size_t size )
|
||||||
{
|
{
|
||||||
if( size!=fread(buffer,1,size,f) )
|
if( size!=fread(buffer,1,size,f) )
|
||||||
throw file_read_error() << errno_info(errno);
|
throw file_read_error() << boost::errinfo_errno(errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_file_name,std::string> file_name_info;
|
|
||||||
|
|
||||||
boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode );
|
boost::shared_ptr<FILE> file_open( char const * file_name, char const * mode );
|
||||||
void file_read( FILE * f, void * buffer, size_t size );
|
void file_read( FILE * f, void * buffer, size_t size );
|
||||||
|
|
||||||
@ -43,7 +39,7 @@ parse_file( char const * file_name )
|
|||||||
catch(
|
catch(
|
||||||
boost::exception & e )
|
boost::exception & e )
|
||||||
{
|
{
|
||||||
e << file_name_info(file_name);
|
e << boost::errinfo_file_name(file_name);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,48 +3,34 @@
|
|||||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
//This program simulates errors on copying simple data files.
|
//This program simulates errors on copying simple data files. It demonstrates
|
||||||
//It demonstrates how the proposed Boost exception library can be used.
|
//typical Boost Exception usage.
|
||||||
//
|
|
||||||
//The documentation for boost::exception can be found at:
|
|
||||||
//
|
|
||||||
// http://www.revergestudios.com/boost-exception/boost-exception.htm.
|
|
||||||
//
|
|
||||||
//The output from this program can vary depending on the compiler/OS combination.
|
|
||||||
|
|
||||||
#include <boost/exception.hpp>
|
//The output from this program can vary depending on the platform.
|
||||||
|
|
||||||
|
#include <boost/throw_exception.hpp>
|
||||||
|
#include <boost/exception/info.hpp>
|
||||||
|
#include <boost/exception/get_error_info.hpp>
|
||||||
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_open_mode.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_handle.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_errno,int> errno_info;
|
typedef boost::error_info<struct tag_file_name_src,std::string> errinfo_src_file_name;
|
||||||
typedef boost::error_info<struct tag_file_stream,boost::weak_ptr<FILE> > file_stream_info;
|
typedef boost::error_info<struct tag_file_name_dst,std::string> errinfo_dst_file_name;
|
||||||
typedef boost::error_info<struct tag_open_mode,std::string> open_mode_info; //The open mode of a failed fopen request.
|
|
||||||
typedef boost::error_info<struct tag_file_name,std::string> file_name_info; //The file name of a failed file operation.
|
|
||||||
typedef boost::error_info<struct tag_file_name_src,std::string> file_name_src_info; //The source file name of a failed copy operation.
|
|
||||||
typedef boost::error_info<struct tag_file_name_dst,std::string> file_name_dst_info; //The destination file name of a failed copy operation.
|
|
||||||
typedef boost::error_info<struct tag_function,std::string> function_info; //The name of the C function which reported the failure.
|
|
||||||
|
|
||||||
std::string
|
|
||||||
to_string( errno_info const & e )
|
|
||||||
{
|
|
||||||
int en=e.value();
|
|
||||||
std::ostringstream s;
|
|
||||||
s << en << ", OS says \"" << strerror(en) << "\"";
|
|
||||||
return s.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
char const data[] = "example";
|
char const data[] = "example";
|
||||||
size_t const data_size = sizeof(data);
|
size_t const data_size = sizeof(data);
|
||||||
|
|
||||||
class
|
class
|
||||||
error: //Base for all exception objects we throw.
|
error: //Base for all exception objects we throw.
|
||||||
public std::exception,
|
public virtual std::exception,
|
||||||
public boost::exception
|
public virtual boost::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -61,14 +47,12 @@ error: //Base for all exception objects we throw.
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class open_error: public error { };
|
struct open_error: virtual error { };
|
||||||
class read_error: public error { };
|
struct read_error: virtual error { };
|
||||||
class write_error: public error { };
|
struct write_error: virtual error { };
|
||||||
|
struct fopen_error: virtual open_error { };
|
||||||
class fopen_error: public open_error { };
|
struct fread_error: virtual read_error { };
|
||||||
class fread_error: public read_error { };
|
struct fwrite_error: virtual write_error { };
|
||||||
class fwrite_error: public write_error { };
|
|
||||||
|
|
||||||
|
|
||||||
boost::shared_ptr<FILE>
|
boost::shared_ptr<FILE>
|
||||||
my_fopen( char const * name, char const * mode )
|
my_fopen( char const * name, char const * mode )
|
||||||
@ -77,10 +61,10 @@ my_fopen( char const * name, char const * mode )
|
|||||||
return boost::shared_ptr<FILE>(f,fclose);
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
else
|
else
|
||||||
BOOST_THROW_EXCEPTION(fopen_error() <<
|
BOOST_THROW_EXCEPTION(fopen_error() <<
|
||||||
errno_info(errno) <<
|
boost::errinfo_errno (errno) <<
|
||||||
file_name_info(name) <<
|
boost::errinfo_file_name(name) <<
|
||||||
open_mode_info(mode) <<
|
boost::errinfo_file_open_mode(mode) <<
|
||||||
function_info("fopen"));
|
boost::errinfo_api_function("fopen"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -89,9 +73,9 @@ my_fread( void * buffer, size_t size, size_t count, boost::shared_ptr<FILE> cons
|
|||||||
assert(stream);
|
assert(stream);
|
||||||
if( count!=fread(buffer,size,count,stream.get()) || ferror(stream.get()) )
|
if( count!=fread(buffer,size,count,stream.get()) || ferror(stream.get()) )
|
||||||
BOOST_THROW_EXCEPTION(fread_error() <<
|
BOOST_THROW_EXCEPTION(fread_error() <<
|
||||||
function_info("fread") <<
|
boost::errinfo_api_function("fread") <<
|
||||||
errno_info(errno) <<
|
boost::errinfo_errno(errno) <<
|
||||||
file_stream_info(boost::weak_ptr<FILE>(stream)));
|
boost::errinfo_file_handle(boost::weak_ptr<FILE>(stream)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -100,9 +84,9 @@ my_fwrite( void const * buffer, size_t size, size_t count, boost::shared_ptr<FIL
|
|||||||
assert(stream);
|
assert(stream);
|
||||||
if( count!=fwrite(buffer,size,count,stream.get()) || ferror(stream.get()) )
|
if( count!=fwrite(buffer,size,count,stream.get()) || ferror(stream.get()) )
|
||||||
BOOST_THROW_EXCEPTION(fwrite_error() <<
|
BOOST_THROW_EXCEPTION(fwrite_error() <<
|
||||||
function_info("fwrite") <<
|
boost::errinfo_api_function("fwrite") <<
|
||||||
errno_info(errno) <<
|
boost::errinfo_errno(errno) <<
|
||||||
file_stream_info(boost::weak_ptr<FILE>(stream)));
|
boost::errinfo_file_handle(boost::weak_ptr<FILE>(stream)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -132,17 +116,17 @@ copy_data( char const * src_file_name, char const * dst_file_name )
|
|||||||
catch(
|
catch(
|
||||||
boost::exception & x )
|
boost::exception & x )
|
||||||
{
|
{
|
||||||
if( boost::weak_ptr<FILE> const * f=boost::get_error_info<file_stream_info>(x) )
|
if( boost::weak_ptr<FILE> const * f=boost::get_error_info<boost::errinfo_file_handle>(x) )
|
||||||
if( boost::shared_ptr<FILE> fs = f->lock() )
|
if( boost::shared_ptr<FILE> fs = f->lock() )
|
||||||
{
|
{
|
||||||
if( fs==src )
|
if( fs==src )
|
||||||
x << file_name_info(src_file_name);
|
x << boost::errinfo_file_name(src_file_name);
|
||||||
else if( fs==dst )
|
else if( fs==dst )
|
||||||
x << file_name_info(dst_file_name);
|
x << boost::errinfo_file_name(dst_file_name);
|
||||||
}
|
}
|
||||||
x <<
|
x <<
|
||||||
file_name_src_info(src_file_name) <<
|
errinfo_src_file_name(src_file_name) <<
|
||||||
file_name_dst_info(dst_file_name);
|
errinfo_dst_file_name(dst_file_name);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,25 +134,25 @@ copy_data( char const * src_file_name, char const * dst_file_name )
|
|||||||
void
|
void
|
||||||
dump_copy_info( boost::exception const & x )
|
dump_copy_info( boost::exception const & x )
|
||||||
{
|
{
|
||||||
if( std::string const * src = boost::get_error_info<file_name_src_info>(x) )
|
if( std::string const * src = boost::get_error_info<errinfo_src_file_name>(x) )
|
||||||
std::cerr << "Source file name: " << *src << "\n";
|
std::cerr << "Source file name: " << *src << "\n";
|
||||||
if( std::string const * dst = boost::get_error_info<file_name_dst_info>(x) )
|
if( std::string const * dst = boost::get_error_info<errinfo_dst_file_name>(x) )
|
||||||
std::cerr << "Destination file name: " << *dst << "\n";
|
std::cerr << "Destination file name: " << *dst << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_file_info( boost::exception const & x )
|
dump_file_info( boost::exception const & x )
|
||||||
{
|
{
|
||||||
if( std::string const * fn = boost::get_error_info<file_name_info>(x) )
|
if( std::string const * fn = boost::get_error_info<boost::errinfo_file_name>(x) )
|
||||||
std::cerr << "File name: " << *fn << "\n";
|
std::cerr << "File name: " << *fn << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_clib_info( boost::exception const & x )
|
dump_clib_info( boost::exception const & x )
|
||||||
{
|
{
|
||||||
if( int const * err=boost::get_error_info<errno_info>(x) )
|
if( int const * err=boost::get_error_info<boost::errinfo_errno>(x) )
|
||||||
std::cerr << "OS error: " << *err << "\n";
|
std::cerr << "OS error: " << *err << "\n";
|
||||||
if( std::string const * fn=boost::get_error_info<function_info>(x) )
|
if( char const * const * fn=boost::get_error_info<boost::errinfo_api_function>(x) )
|
||||||
std::cerr << "Failed function: " << *fn << "\n";
|
std::cerr << "Failed function: " << *fn << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,21 +3,21 @@
|
|||||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
//This example shows how boost::error_info_group can be used to bundle
|
//This example shows how boost::tuple can be used to bundle the
|
||||||
//the name of the function that fails together with the reported errno.
|
//name of the function that fails together with the reported errno.
|
||||||
|
|
||||||
#include <boost/exception/info_tuple.hpp>
|
#include <boost/exception/info_tuple.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
typedef boost::error_info<struct tag_file_name,std::string> file_name_info;
|
typedef boost::tuple<boost::errinfo_api_function,boost::errinfo_errno> clib_failure;
|
||||||
typedef boost::error_info<struct tag_function,char const *> function_info;
|
|
||||||
typedef boost::error_info<struct tag_errno,int> errno_info;
|
|
||||||
typedef boost::tuple<function_info,errno_info> clib_failure;
|
|
||||||
|
|
||||||
class file_open_error: public boost::exception { };
|
struct file_open_error: virtual boost::exception { };
|
||||||
|
|
||||||
boost::shared_ptr<FILE>
|
boost::shared_ptr<FILE>
|
||||||
file_open( char const * name, char const * mode )
|
file_open( char const * name, char const * mode )
|
||||||
@ -26,6 +26,6 @@ file_open( char const * name, char const * mode )
|
|||||||
return boost::shared_ptr<FILE>(f,fclose);
|
return boost::shared_ptr<FILE>(f,fclose);
|
||||||
else
|
else
|
||||||
throw file_open_error() <<
|
throw file_open_error() <<
|
||||||
file_name_info(name) <<
|
boost::errinfo_file_name(name) <<
|
||||||
clib_failure("fopen",errno);
|
clib_failure("fopen",errno);
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
//This example shows to print all data contained in a boost::exception.
|
//This example shows how to print all data contained in a boost::exception.
|
||||||
|
|
||||||
#include <boost/exception.hpp>
|
#include <boost/exception/all.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
void f(); //throws unknown types that derive from boost::exception.
|
void f(); //throws unknown types that derive from boost::exception.
|
||||||
|
26
include/boost/exception/all.hpp
Normal file
26
include/boost/exception/all.hpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_316FDA946C0D11DEA9CBAE5255D89593
|
||||||
|
#define UUID_316FDA946C0D11DEA9CBAE5255D89593
|
||||||
|
|
||||||
|
#include <boost/exception/diagnostic_information.hpp>
|
||||||
|
#include <boost/exception/error_info.hpp>
|
||||||
|
#include <boost/exception/exception.hpp>
|
||||||
|
#include <boost/exception/get_error_info.hpp>
|
||||||
|
#include <boost/exception/info.hpp>
|
||||||
|
#include <boost/exception/info_tuple.hpp>
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
||||||
|
#include <boost/exception/errinfo_at_line.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_handle.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_open_mode.hpp>
|
||||||
|
#include <boost/exception/errinfo_type_info_name.hpp>
|
||||||
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
|
#include <boost/exception_ptr.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
22
include/boost/exception/errinfo_api_function.hpp
Normal file
22
include/boost/exception/errinfo_api_function.hpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_DDFBB4546C1211DEA4659E9055D89593
|
||||||
|
#define UUID_DDFBB4546C1211DEA4659E9055D89593
|
||||||
|
|
||||||
|
#include "boost/exception/error_info.hpp"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
//Usage hint:
|
||||||
|
//if( api_function(....)!=0 )
|
||||||
|
// BOOST_THROW_EXCEPTION(
|
||||||
|
// failure() <<
|
||||||
|
// errinfo_api_function("api_function") );
|
||||||
|
typedef error_info<struct errinfo_api_function_,char const *> errinfo_api_function;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
18
include/boost/exception/errinfo_at_line.hpp
Normal file
18
include/boost/exception/errinfo_at_line.hpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_E7255CE26C1211DE85800C9155D89593
|
||||||
|
#define UUID_E7255CE26C1211DE85800C9155D89593
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class Tag,class T> class error_info;
|
||||||
|
|
||||||
|
//Use with parsing errors exceptions, for example in a XML file parser.
|
||||||
|
typedef error_info<struct errinfo_at_line_,int> errinfo_at_line;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
35
include/boost/exception/errinfo_errno.hpp
Normal file
35
include/boost/exception/errinfo_errno.hpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_F0EE17BE6C1211DE87FF459155D89593
|
||||||
|
#define UUID_F0EE17BE6C1211DE87FF459155D89593
|
||||||
|
|
||||||
|
#include "boost/exception/info.hpp"
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
typedef error_info<struct errinfo_errno_,int> errinfo_errno;
|
||||||
|
|
||||||
|
//Usage hint:
|
||||||
|
//if( c_function(....)!=0 )
|
||||||
|
// BOOST_THROW_EXCEPTION(
|
||||||
|
// failure() <<
|
||||||
|
// errinfo_errno(errno) <<
|
||||||
|
// errinfo_api_function("c_function") );
|
||||||
|
inline
|
||||||
|
std::string
|
||||||
|
to_string( errinfo_errno const & e )
|
||||||
|
{
|
||||||
|
std::ostringstream tmp;
|
||||||
|
int v=e.value();
|
||||||
|
tmp << v << ", \"" << strerror(v) << "\"";
|
||||||
|
return tmp.str();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
20
include/boost/exception/errinfo_file_handle.hpp
Normal file
20
include/boost/exception/errinfo_file_handle.hpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_F79E6EE26C1211DEB26E929155D89593
|
||||||
|
#define UUID_F79E6EE26C1211DEB26E929155D89593
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class> class weak_ptr;
|
||||||
|
template <class Tag,class T> class error_info;
|
||||||
|
|
||||||
|
typedef error_info<struct errinfo_file_handle_,weak_ptr<FILE> > errinfo_file_handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
26
include/boost/exception/errinfo_file_name.hpp
Normal file
26
include/boost/exception/errinfo_file_name.hpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_FEE5120A6C1211DE94E8BC9155D89593
|
||||||
|
#define UUID_FEE5120A6C1211DE94E8BC9155D89593
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class Tag,class T> class error_info;
|
||||||
|
|
||||||
|
//Usage hint:
|
||||||
|
//FILE * f=fopen(name,mode);
|
||||||
|
//if( !f )
|
||||||
|
// BOOST_THROW_EXCEPTION(
|
||||||
|
// file_open_error() <<
|
||||||
|
// errinfo_file_name(name) <<
|
||||||
|
// errinfo_file_open_mode(mode) );
|
||||||
|
typedef error_info<struct errinfo_file_name_,std::string> errinfo_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
26
include/boost/exception/errinfo_file_open_mode.hpp
Normal file
26
include/boost/exception/errinfo_file_open_mode.hpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_056F1F266C1311DE8E74299255D89593
|
||||||
|
#define UUID_056F1F266C1311DE8E74299255D89593
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class Tag,class T> class error_info;
|
||||||
|
|
||||||
|
//Usage hint:
|
||||||
|
//FILE * f=fopen(name,mode);
|
||||||
|
//if( !f )
|
||||||
|
// BOOST_THROW_EXCEPTION(
|
||||||
|
// file_open_error() <<
|
||||||
|
// errinfo_file_name(name) <<
|
||||||
|
// errinfo_file_open_mode(mode) );
|
||||||
|
typedef error_info<struct errinfo_file_open_mode_,std::string> errinfo_file_open_mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
23
include/boost/exception/errinfo_type_info_name.hpp
Normal file
23
include/boost/exception/errinfo_type_info_name.hpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#ifndef UUID_0E11109E6C1311DEB7EA649255D89593
|
||||||
|
#define UUID_0E11109E6C1311DEB7EA649255D89593
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace
|
||||||
|
boost
|
||||||
|
{
|
||||||
|
template <class Tag,class T> class error_info;
|
||||||
|
|
||||||
|
//Usage hint:
|
||||||
|
//BOOST_THROW_EXCEPTION(
|
||||||
|
// bad_type() <<
|
||||||
|
// errinfo_type_info_name(typeid(x).name()) );
|
||||||
|
typedef error_info<struct errinfo_type_info_name_,std::string> errinfo_type_info_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -80,13 +80,13 @@ boost
|
|||||||
template <class Tag,class T>
|
template <class Tag,class T>
|
||||||
class error_info;
|
class error_info;
|
||||||
|
|
||||||
typedef error_info<struct tag_throw_function,char const *> throw_function;
|
typedef error_info<struct throw_function_,char const *> throw_function;
|
||||||
typedef error_info<struct tag_throw_file,char const *> throw_file;
|
typedef error_info<struct throw_file_,char const *> throw_file;
|
||||||
typedef error_info<struct tag_throw_line,int> throw_line;
|
typedef error_info<struct throw_line_,int> throw_line;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
class
|
class
|
||||||
error_info<tag_throw_function,char const *>
|
error_info<throw_function_,char const *>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char const * value_type;
|
typedef char const * value_type;
|
||||||
@ -100,7 +100,7 @@ boost
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
class
|
class
|
||||||
error_info<tag_throw_file,char const *>
|
error_info<throw_file_,char const *>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef char const * value_type;
|
typedef char const * value_type;
|
||||||
@ -114,7 +114,7 @@ boost
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
class
|
class
|
||||||
error_info<tag_throw_line,int>
|
error_info<throw_line_,int>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef int value_type;
|
typedef int value_type;
|
||||||
|
@ -35,6 +35,7 @@ run diagnostic_information_test.cpp ;
|
|||||||
run refcount_ptr_test.cpp ;
|
run refcount_ptr_test.cpp ;
|
||||||
run current_exception_cast_test.cpp ;
|
run current_exception_cast_test.cpp ;
|
||||||
run no_exceptions_test.cpp : : : <exception-handling>off ;
|
run no_exceptions_test.cpp : : : <exception-handling>off ;
|
||||||
|
run errinfos_test.cpp ;
|
||||||
compile-fail exception_fail.cpp ;
|
compile-fail exception_fail.cpp ;
|
||||||
compile-fail throw_exception_fail.cpp ;
|
compile-fail throw_exception_fail.cpp ;
|
||||||
|
|
||||||
@ -49,4 +50,12 @@ compile info_hpp_test.cpp ;
|
|||||||
compile info_tuple_hpp_test.cpp ;
|
compile info_tuple_hpp_test.cpp ;
|
||||||
compile to_string_hpp_test.cpp ;
|
compile to_string_hpp_test.cpp ;
|
||||||
compile to_string_stub_hpp_test.cpp ;
|
compile to_string_stub_hpp_test.cpp ;
|
||||||
|
compile all_hpp_test.cpp ;
|
||||||
compile current_exception_cast_hpp_test.cpp ;
|
compile current_exception_cast_hpp_test.cpp ;
|
||||||
|
compile errinfo_api_function_hpp_test.cpp ;
|
||||||
|
compile errinfo_at_line_hpp_test.cpp ;
|
||||||
|
compile errinfo_errno_hpp_test.cpp ;
|
||||||
|
compile errinfo_file_handle_hpp_test.cpp ;
|
||||||
|
compile errinfo_file_name_hpp_test.cpp ;
|
||||||
|
compile errinfo_file_open_mode_hpp_test.cpp ;
|
||||||
|
compile errinfo_type_info_name_hpp_test.cpp ;
|
||||||
|
7
test/all_hpp_test.cpp
Normal file
7
test/all_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/all.hpp>
|
||||||
|
#include <boost/exception/all.hpp>
|
7
test/errinfo_api_function_hpp_test.cpp
Normal file
7
test/errinfo_api_function_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
7
test/errinfo_at_line_hpp_test.cpp
Normal file
7
test/errinfo_at_line_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_at_line.hpp>
|
||||||
|
#include <boost/exception/errinfo_at_line.hpp>
|
7
test/errinfo_errno_hpp_test.cpp
Normal file
7
test/errinfo_errno_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
7
test/errinfo_file_handle_hpp_test.cpp
Normal file
7
test/errinfo_file_handle_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_file_handle.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_handle.hpp>
|
7
test/errinfo_file_name_hpp_test.cpp
Normal file
7
test/errinfo_file_name_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
7
test/errinfo_file_open_mode_hpp_test.cpp
Normal file
7
test/errinfo_file_open_mode_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_file_open_mode.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_open_mode.hpp>
|
7
test/errinfo_type_info_name_hpp_test.cpp
Normal file
7
test/errinfo_type_info_name_hpp_test.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_type_info_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_type_info_name.hpp>
|
61
test/errinfos_test.cpp
Normal file
61
test/errinfos_test.cpp
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||||
|
|
||||||
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
#include <boost/exception/errinfo_api_function.hpp>
|
||||||
|
#include <boost/exception/errinfo_at_line.hpp>
|
||||||
|
#include <boost/exception/errinfo_errno.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_handle.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_name.hpp>
|
||||||
|
#include <boost/exception/errinfo_file_open_mode.hpp>
|
||||||
|
#include <boost/exception/errinfo_type_info_name.hpp>
|
||||||
|
#include <boost/exception/info.hpp>
|
||||||
|
#include <boost/exception/get_error_info.hpp>
|
||||||
|
#include <boost/throw_exception.hpp>
|
||||||
|
#include <boost/weak_ptr.hpp>
|
||||||
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
struct
|
||||||
|
test_exception:
|
||||||
|
virtual boost::exception,
|
||||||
|
virtual std::exception
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
using namespace boost;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
BOOST_THROW_EXCEPTION(
|
||||||
|
test_exception() <<
|
||||||
|
errinfo_api_function("failed_api_function") <<
|
||||||
|
errinfo_at_line(42) <<
|
||||||
|
errinfo_errno(errno) <<
|
||||||
|
errinfo_file_handle(weak_ptr<FILE>()) <<
|
||||||
|
errinfo_file_name("filename.txt") <<
|
||||||
|
errinfo_file_open_mode("rb") <<
|
||||||
|
errinfo_type_info_name(typeid(int).name()) );
|
||||||
|
BOOST_TEST(false);
|
||||||
|
}
|
||||||
|
catch(
|
||||||
|
boost::exception & e )
|
||||||
|
{
|
||||||
|
BOOST_TEST(get_error_info<errinfo_api_function>(e) && *get_error_info<errinfo_api_function>(e)==std::string("failed_api_function"));
|
||||||
|
BOOST_TEST(get_error_info<errinfo_at_line>(e) && *get_error_info<errinfo_at_line>(e)==42);
|
||||||
|
BOOST_TEST(get_error_info<errinfo_errno>(e) && *get_error_info<errinfo_errno>(e)==0);
|
||||||
|
BOOST_TEST(get_error_info<errinfo_file_handle>(e) && get_error_info<errinfo_file_handle>(e)->expired());
|
||||||
|
BOOST_TEST(get_error_info<errinfo_file_name>(e) && *get_error_info<errinfo_file_name>(e)=="filename.txt");
|
||||||
|
BOOST_TEST(get_error_info<errinfo_file_open_mode>(e) && *get_error_info<errinfo_file_open_mode>(e)=="rb");
|
||||||
|
BOOST_TEST(get_error_info<errinfo_type_info_name>(e) && *get_error_info<errinfo_type_info_name>(e)==typeid(int).name());
|
||||||
|
}
|
||||||
|
catch(
|
||||||
|
... )
|
||||||
|
{
|
||||||
|
BOOST_TEST(false);
|
||||||
|
}
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
Reference in New Issue
Block a user