Changeset 2410:fe46b61da4e3 in lemon-0.x for lemon/error.h
- Timestamp:
- 03/14/07 19:01:04 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3241
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/error.h
r2391 r2410 476 476 477 477 template <typename Exception> 478 inline void assert_fail(const char *file, int line, const char *func, 479 Exception exception, const char *assertion = 0, 480 bool do_abort=true) 478 inline void assert_fail(const char *file, int line, 479 const char *func, 480 Exception exception, 481 const char *assertion = 0, 482 bool do_abort=true) 481 483 { 482 484 using namespace std; … … 511 513 } 512 514 515 template <> 516 inline void assert_fail<std::string>(const char *file, int line, 517 const char *func, 518 std::string message, 519 const char *assertion, 520 bool do_abort) 521 { 522 assert_fail(file, line, func, message.c_str(), assertion, do_abort); 523 } 524 513 525 template <typename Exception> 514 526 inline void assert_fail_failure(const char *file, int line, const char *func, … … 522 534 template <> 523 535 inline void assert_fail_failure<const char *>(const char *file, int line, 524 525 526 527 536 const char *func, 537 const char *message, 538 const char *assertion, 539 bool) 528 540 { 529 541 throw AssertionFailedError(file, line, func, message, assertion); 542 } 543 544 template <> 545 inline void assert_fail_failure<std::string>(const char *file, int line, 546 const char *func, 547 std::string message, 548 const char *assertion, 549 bool) 550 { 551 assert_fail_failure(file, line, func, message.c_str(), assertion, true); 530 552 } 531 553 … … 546 568 { 547 569 throw AssertionFailedError(file, line, func, message, assertion); 570 } 571 572 template <> 573 inline void assert_fail_exception<std::string>(const char *file, int line, 574 const char *func, 575 std::string message, 576 const char *assertion, 577 bool) 578 { 579 assert_fail_exception(file, line, func, message.c_str(), assertion, true); 548 580 } 549 581
Note: See TracChangeset
for help on using the changeset viewer.