Changeset 69011 in vbox for trunk/include/iprt
- Timestamp:
- Oct 9, 2017 11:52:45 AM (7 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/err.h
r68920 r69011 554 554 */ 555 555 RTDECL(int) RTErrInfoAddV(PRTERRINFO pErrInfo, int rc, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(3, 0); 556 557 /** @name RTERRINFO_LOG_F_XXX 558 * @{ */ 559 /** Both debug and release log. */ 560 #define RTERRINFO_LOG_F_RELEASE RT_BIT_32(0) 561 /** @} */ 562 563 /** 564 * Fills in the error info details. 565 * 566 * @returns @a rc. 567 * 568 * @param pErrInfo The error info structure to fill in. 569 * @param rc The status code to return. 570 * @param iLogGroup The logging group. 571 * @param fFlags RTERRINFO_LOG_F_XXX. 572 * @param pszMsg The error message string. 573 */ 574 RTDECL(int) RTErrInfoLogAndSet(PRTERRINFO pErrInfo, int rc, uint32_t iLogGroup, uint32_t fFlags, const char *pszMsg); 575 576 /** 577 * Fills in the error info details, with a sprintf style message. 578 * 579 * @returns @a rc. 580 * 581 * @param pErrInfo The error info structure to fill in. 582 * @param rc The status code to return. 583 * @param iLogGroup The logging group. 584 * @param fFlags RTERRINFO_LOG_F_XXX. 585 * @param pszFormat The format string. 586 * @param ... The format arguments. 587 */ 588 RTDECL(int) RTErrInfoLogAndSetF(PRTERRINFO pErrInfo, int rc, uint32_t iLogGroup, uint32_t fFlags, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(5, 6); 589 590 /** 591 * Fills in the error info details, with a vsprintf style message. 592 * 593 * @returns @a rc. 594 * 595 * @param pErrInfo The error info structure to fill in. 596 * @param rc The status code to return. 597 * @param iLogGroup The logging group. 598 * @param fFlags RTERRINFO_LOG_F_XXX. 599 * @param pszFormat The format string. 600 * @param va The format arguments. 601 */ 602 RTDECL(int) RTErrInfoLogAndSetV(PRTERRINFO pErrInfo, int rc, uint32_t iLogGroup, uint32_t fFlags, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(5, 0); 603 604 /** 605 * Adds more error info details. 606 * 607 * @returns @a rc. 608 * 609 * @param pErrInfo The error info structure to fill in. 610 * @param rc The status code to return. 611 * @param iLogGroup The logging group. 612 * @param fFlags RTERRINFO_LOG_F_XXX. 613 * @param pszMsg The error message string to add. 614 */ 615 RTDECL(int) RTErrInfoLogAndAdd(PRTERRINFO pErrInfo, int rc, uint32_t iLogGroup, uint32_t fFlags, const char *pszMsg); 616 617 /** 618 * Adds more error info details, with a sprintf style message. 619 * 620 * @returns @a rc. 621 * 622 * @param pErrInfo The error info structure to fill in. 623 * @param rc The status code to return. 624 * @param iLogGroup The logging group. 625 * @param fFlags RTERRINFO_LOG_F_XXX. 626 * @param pszFormat The format string to add. 627 * @param ... The format arguments. 628 */ 629 RTDECL(int) RTErrInfoLogAndAddF(PRTERRINFO pErrInfo, int rc, uint32_t iLogGroup, uint32_t fFlags, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(5, 6); 630 631 /** 632 * Adds more error info details, with a vsprintf style message. 633 * 634 * @returns @a rc. 635 * 636 * @param pErrInfo The error info structure to fill in. 637 * @param rc The status code to return. 638 * @param iLogGroup The logging group. 639 * @param fFlags RTERRINFO_LOG_F_XXX. 640 * @param pszFormat The format string to add. 641 * @param va The format arguments. 642 */ 643 RTDECL(int) RTErrInfoLogAndAddV(PRTERRINFO pErrInfo, int rc, uint32_t iLogGroup, uint32_t fFlags, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(5, 0); 644 645 /** @name Macros wrapping the RTErrInfoLog* functions. 646 * @{ */ 647 #define RTERRINFO_LOG_SET( a_pErrInfo, a_rc, a_pszMsg) RTErrInfoLogAndSet( a_pErrInfo, a_rc, LOG_GROUP, 0, a_pszMsg) 648 #define RTERRINFO_LOG_SET_V(a_pErrInfo, a_rc, a_pszMsg, a_va) RTErrInfoLogAndSetV(a_pErrInfo, a_rc, LOG_GROUP, 0, a_pszMsg, a_va) 649 #define RTERRINFO_LOG_ADD( a_pErrInfo, a_rc, a_pszMsg) RTErrInfoLogAndAdd( a_pErrInfo, a_rc, LOG_GROUP, 0, a_pszMsg) 650 #define RTERRINFO_LOG_ADD_V(a_pErrInfo, a_rc, a_pszMsg, a_va) RTErrInfoLogAndAddV(a_pErrInfo, a_rc, LOG_GROUP, 0, a_pszMsg, a_va) 651 #ifdef RT_COMPILER_SUPPORTS_VA_ARGS 652 # define RTERRINFO_LOG_ADD_F(a_pErrInfo, a_rc, ...) RTErrInfoLogAndAddF(a_pErrInfo, a_rc, LOG_GROUP, 0, __VA_ARGS__) 653 # define RTERRINFO_LOG_SET_F(a_pErrInfo, a_rc, ...) RTErrInfoLogAndSetF(a_pErrInfo, a_rc, LOG_GROUP, 0, __VA_ARGS__) 654 #endif 655 656 #define RTERRINFO_LOG_REL_SET( a_pErrInfo, a_rc, a_pszMsg) RTErrInfoLogAndSet( a_pErrInfo, a_rc, LOG_GROUP, RTERRINFO_LOG_F_RELEASE, a_pszMsg) 657 #define RTERRINFO_LOG_REL_SET_V(a_pErrInfo, a_rc, a_pszMsg, a_va) RTErrInfoLogAndSetV(a_pErrInfo, a_rc, LOG_GROUP, RTERRINFO_LOG_F_RELEASE, a_pszMsg, a_va) 658 #define RTERRINFO_LOG_REL_ADD( a_pErrInfo, a_rc, a_pszMsg) RTErrInfoLogAndAdd( a_pErrInfo, a_rc, LOG_GROUP, RTERRINFO_LOG_F_RELEASE, a_pszMsg) 659 #define RTERRINFO_LOG_REL_ADD_V(a_pErrInfo, a_rc, a_pszMsg, a_va) RTErrInfoLogAndAddV(a_pErrInfo, a_rc, LOG_GROUP, RTERRINFO_LOG_F_RELEASE, a_pszMsg, a_va) 660 #ifdef RT_COMPILER_SUPPORTS_VA_ARGS 661 # define RTERRINFO_LOG_REL_ADD_F(a_pErrInfo, a_rc, ...) RTErrInfoLogAndAddF(a_pErrInfo, a_rc, LOG_GROUP, RTERRINFO_LOG_F_RELEASE, __VA_ARGS__) 662 # define RTERRINFO_LOG_REL_SET_F(a_pErrInfo, a_rc, ...) RTErrInfoLogAndSetF(a_pErrInfo, a_rc, LOG_GROUP, RTERRINFO_LOG_F_RELEASE, __VA_ARGS__) 663 #else 664 # define RTERRINFO_LOG_REL_ADD_F RTErrInfoSetF 665 # define RTERRINFO_LOG_REL_SET_F RTErrInfoAddF 666 #endif 667 /** @} */ 668 556 669 557 670 /** -
trunk/include/iprt/mangling.h
r68884 r69011 839 839 # define RTErrInfoSetF RT_MANGLER(RTErrInfoSetF) 840 840 # define RTErrInfoSetV RT_MANGLER(RTErrInfoSetV) 841 # define RTErrInfoLogAndSet RT_MANGLER(RTErrInfoLogAndSet) 842 # define RTErrInfoLogAndSetF RT_MANGLER(RTErrInfoLogAndSetF) 843 # define RTErrInfoLogAndSetV RT_MANGLER(RTErrInfoLogAndSetV) 844 # define RTErrInfoLogAndAdd RT_MANGLER(RTErrInfoLogAndAdd) 845 # define RTErrInfoLogAndAddF RT_MANGLER(RTErrInfoLogAndAddF) 846 # define RTErrInfoLogAndAddV RT_MANGLER(RTErrInfoLogAndAddV) 841 847 # define RTErrVarsAreEqual RT_MANGLER(RTErrVarsAreEqual) 842 848 # define RTErrVarsHaveChanged RT_MANGLER(RTErrVarsHaveChanged)
Note:
See TracChangeset
for help on using the changeset viewer.