1//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
2
3//Distributed under the Boost Software License, Version 1.0. (See accompanying
4//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#include <boost/config.hpp>
7
8#if defined( BOOST_NO_EXCEPTIONS )
9# error This program requires exception handling.
10#endif
11
12#include <boost/exception/exception.hpp>
13#include <stdexcept>
14#include <string>
15
16namespace
17boost
18 {
19 namespace
20 exception_test
21 {
22 void
23 throw_length_error()
24 {
25 throw enable_error_info( x: std::length_error("exception test length error") );
26 }
27 }
28 }
29

source code of boost/libs/exception/test/helper1.cpp