Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Created by Phil on 5/8/2012. |
| 3 | * Copyright 2012 Two Blue Cubes Ltd. All rights reserved. |
| 4 | * |
| 5 | * Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 6 | * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | */ |
| 8 | #ifndef TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_HPP_INCLUDED |
| 9 | #define TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_HPP_INCLUDED |
Phil Nash | 5234b15 | 2012-08-06 08:33:15 +0100 | [diff] [blame] | 10 | |
Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 11 | #include "catch_notimplemented_exception.h" |
| 12 | #include <ostream> |
Phil Nash | 5234b15 | 2012-08-06 08:33:15 +0100 | [diff] [blame] | 13 | |
Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 14 | namespace Catch { |
Phil Nash | 5234b15 | 2012-08-06 08:33:15 +0100 | [diff] [blame] | 15 | |
Phil Nash | 2a9d8d9 | 2013-04-23 18:58:56 +0100 | [diff] [blame] | 16 | NotImplementedException::NotImplementedException( SourceLineInfo const& lineInfo ) |
Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 17 | : m_lineInfo( lineInfo ) { |
| 18 | std::ostringstream oss; |
Phil Nash | 42aef1d | 2013-01-13 21:51:44 +0000 | [diff] [blame] | 19 | oss << lineInfo << ": function "; |
Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 20 | oss << "not implemented"; |
| 21 | m_what = oss.str(); |
| 22 | } |
Phil Nash | 5234b15 | 2012-08-06 08:33:15 +0100 | [diff] [blame] | 23 | |
gnzlbg | ce65985 | 2014-03-20 12:48:19 +0100 | [diff] [blame^] | 24 | const char* NotImplementedException::what() const CATCH_NOEXCEPT { |
Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 25 | return m_what.c_str(); |
| 26 | } |
Phil Nash | f3d1f08 | 2013-07-03 19:14:59 +0100 | [diff] [blame] | 27 | |
Phil Nash | 1091ca8 | 2012-08-06 20:16:53 +0100 | [diff] [blame] | 28 | } // end namespace Catch |
| 29 | |
Matt Wozniski | f29c898 | 2012-09-17 01:42:29 -0400 | [diff] [blame] | 30 | #endif // TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_HPP_INCLUDED |