Changeset 8591 in vbox for trunk/include/iprt
- Timestamp:
- May 5, 2008 2:08:04 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30507
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/assert.h
r8590 r8591 1662 1662 * @remark rc is references multiple times. 1663 1663 */ 1664 #define AssertReleaseRC(rc) AssertReleaseMsgRC(rc, ("%Vra\n", (rc)))1664 #define AssertReleaseRC(rc) AssertReleaseMsgRC(rc, ("%Vra\n", (rc))) 1665 1665 1666 1666 /** @def AssertReleaseRCReturn … … 1674 1674 * @remark rc is references multiple times. 1675 1675 */ 1676 #define AssertReleaseRCReturn(rc, rcRet) AssertReleaseMsgRCReturn(rc, ("%Vra\n", (rc)), rcRet)1676 #define AssertReleaseRCReturn(rc, rcRet) AssertReleaseMsgRCReturn(rc, ("%Vra\n", (rc)), rcRet) 1677 1677 1678 1678 /** @def AssertReleaseRCReturnVoid … … 1685 1685 * @remark rc is references multiple times. 1686 1686 */ 1687 #define AssertReleaseRCReturnVoid(rc) AssertReleaseMsgRCReturnVoid(rc, ("%Vra\n", (rc))) 1687 #define AssertReleaseRCReturnVoid(rc) AssertReleaseMsgRCReturnVoid(rc, ("%Vra\n", (rc))) 1688 1689 /** @def AssertReleaseRCBreak 1690 * Asserts a iprt status code successful, breaking if it isn't. 1691 * 1692 * On failure information about the error will be printed, a breakpoint hit 1693 * and finally breaking the current statement if the breakpoint is somehow ignored. 1694 * 1695 * @param rc iprt status code. 1696 * @remark rc is references multiple times. 1697 */ 1698 #define AssertReleaseRCBreak(rc) AssertReleaseMsgRCBreakVoid(rc, ("%Vra\n", (rc))) 1688 1699 1689 1700 /** @def AssertReleaseRCBreakStmt … … 1699 1710 #define AssertReleaseRCBreakStmt(rc, stmt) AssertReleaseMsgRCBreakStmt(rc, ("%Vra\n", (rc)), stmt) 1700 1711 1701 /** @def AssertReleaseRCBreakVoid 1702 * Asserts a iprt status code successful, breaking if it isn't. 1712 /** @def AssertReleaseMsgRC 1713 * Asserts a iprt status code successful. 1714 * 1715 * On failure a custom message is printed and a breakpoint is hit. 1716 * 1717 * @param rc iprt status code. 1718 * @param msg printf argument list (in parenthesis). 1719 * @remark rc is references multiple times. 1720 */ 1721 #define AssertReleaseMsgRC(rc, msg) AssertReleaseMsg(RT_SUCCESS_NP(rc), msg) 1722 1723 /** @def AssertReleaseMsgRCReturn 1724 * Asserts a iprt status code successful. 1725 * 1726 * On failure a custom message is printed, a breakpoint is hit, and finally 1727 * returning from the function if the breakpoint is showhow ignored. 1728 * 1729 * @param rc iprt status code. 1730 * @param msg printf argument list (in parenthesis). 1731 * @param rcRet What is to be presented to return. 1732 * @remark rc is references multiple times. 1733 */ 1734 #define AssertReleaseMsgRCReturn(rc, msg, rcRet) AssertReleaseMsgReturn(RT_SUCCESS_NP(rc), msg, rcRet) 1735 1736 /** @def AssertReleaseMsgRCReturnVoid 1737 * Asserts a iprt status code successful. 1738 * 1739 * On failure a custom message is printed, a breakpoint is hit, and finally 1740 * returning from the function if the breakpoint is showhow ignored. 1741 * 1742 * @param rc iprt status code. 1743 * @param msg printf argument list (in parenthesis). 1744 * @remark rc is references multiple times. 1745 */ 1746 #define AssertReleaseMsgRCReturnVoid(rc, msg) AssertReleaseMsgReturnVoid(RT_SUCCESS_NP(rc), msg) 1747 1748 /** @def AssertReleaseMsgRCBreakStmt 1749 * Asserts a iprt status code successful. 1750 * 1751 * On failure a custom message is printed, a breakpoint is hit, and finally 1752 * the brean statement is issued if the breakpoint is showhow ignored. 1753 * 1754 * @param rc iprt status code. 1755 * @param msg printf argument list (in parenthesis). 1756 * @param stmt Statement to execute before break in case of a failed assertion. 1757 * @remark rc is references multiple times. 1758 */ 1759 #define AssertReleaseMsgRCBreakStmt(rc, msg, stmt) AssertReleaseMsgBreakStmt(RT_SUCCESS_NP(rc), msg, stmt) 1760 1761 /** @def AssertReleaseMsgRCBreakVoid 1762 * Asserts a iprt status code successful. 1763 * 1764 * On failure a custom message is printed, a breakpoint is hit, and finally 1765 * breaking the current status if the breakpoint is showhow ignored. 1766 * 1767 * @param rc iprt status code. 1768 * @param msg printf argument list (in parenthesis). 1769 * @remark rc is references multiple times. 1770 * @todo Rename to AssertReleaseMsgRCBreak. 1771 */ 1772 #define AssertReleaseMsgRCBreakVoid(rc, msg) AssertReleaseMsgBreak(RT_SUCCESS(rc), msg) 1773 1774 /** @def AssertReleaseRCSuccess 1775 * Asserts that an iprt status code equals VINF_SUCCESS. 1776 * 1777 * On failure information about the error will be printed and a breakpoint hit. 1778 * 1779 * @param rc iprt status code. 1780 * @remark rc is references multiple times. 1781 */ 1782 #define AssertReleaseRCSuccess(rc) AssertReleaseMsg((rc) == VINF_SUCCESS, ("%Vra\n", (rc))) 1783 1784 /** @def AssertReleaseRCSuccessReturn 1785 * Asserts that an iprt status code equals VINF_SUCCESS. 1786 * 1787 * On failure information about the error will be printed, a breakpoint hit 1788 * and finally returning from the function if the breakpoint is somehow ignored. 1789 * 1790 * @param rc iprt status code. 1791 * @param rcRet What is to be presented to return. 1792 * @remark rc is references multiple times. 1793 */ 1794 #define AssertReleaseRCSuccessReturn(rc, rcRet) AssertReleaseMsgReturn((rc) == VINF_SUCCESS, ("%Vra\n", (rc)), rcRet) 1795 1796 /** @def AssertReleaseRCSuccessReturnVoid 1797 * Asserts that an iprt status code equals VINF_SUCCESS. 1798 * 1799 * On failure information about the error will be printed, a breakpoint hit 1800 * and finally returning from the function if the breakpoint is somehow ignored. 1801 * 1802 * @param rc iprt status code. 1803 * @remark rc is references multiple times. 1804 */ 1805 #define AssertReleaseRCSuccessReturnVoid(rc) AssertReleaseMsgReturnVoid((rc) == VINF_SUCCESS, ("%Vra\n", (rc))) 1806 1807 /** @def AssertReleaseRCSuccessBreakStmt 1808 * Asserts that an iprt status code equals VINF_SUCCESS. 1809 * 1810 * On failure information about the error will be printed, a breakpoint hit 1811 * and finally the break statement will be issued if the breakpoint is somehow ignored. 1812 * 1813 * @param rc iprt status code. 1814 * @param stmt Statement to execute before break in case of a failed assertion. 1815 * @remark rc is references multiple times. 1816 */ 1817 #define AssertReleaseRCSuccessBreakStmt(rc, stmt) AssertReleaseMsgBreakStmt((rc) == VINF_SUCCESS, ("%Vra\n", (rc)), stmt) 1818 1819 /** @def AssertReleaseRCSuccessBreakVoid 1820 * Asserts that an iprt status code equals VINF_SUCCESS. 1703 1821 * 1704 1822 * On failure information about the error will be printed, a breakpoint hit … … 1707 1825 * @param rc iprt status code. 1708 1826 * @remark rc is references multiple times. 1709 * @todo Rename to AssertReleaseRCBreak. 1710 */ 1711 #define AssertReleaseRCBreakVoid(rc) AssertReleaseMsgRCBreakVoid(rc, ("%Vra\n", (rc))) 1827 * @todo Rename to AssertReleaseRCSuccessBreak. 1828 */ 1829 #define AssertReleaseRCSuccessBreakVoid(rc) AssertReleaseMsgBreak((rc) == VINF_SUCCESS, ("%Vra\n", (rc))) 1830 1831 1832 /** @def AssertFatalRC 1833 * Asserts a iprt status code successful. 1834 * 1835 * On failure information about the error will be printed and a breakpoint hit. 1836 * 1837 * @param rc iprt status code. 1838 * @remark rc is references multiple times. 1839 */ 1840 #define AssertFatalRC(rc) AssertFatalMsgRC(rc, ("%Vra\n", (rc))) 1712 1841 1713 1842 /** @def AssertReleaseMsgRC … … 1720 1849 * @remark rc is references multiple times. 1721 1850 */ 1722 #define AssertReleaseMsgRC(rc, msg) AssertReleaseMsg(RT_SUCCESS_NP(rc), msg)1723 1724 /** @def AssertReleaseMsgRCReturn1725 * Asserts a iprt status code successful.1726 *1727 * On failure a custom message is printed, a breakpoint is hit, and finally1728 * returning from the function if the breakpoint is showhow ignored.1729 *1730 * @param rc iprt status code.1731 * @param msg printf argument list (in parenthesis).1732 * @param rcRet What is to be presented to return.1733 * @remark rc is references multiple times.1734 */1735 #define AssertReleaseMsgRCReturn(rc, msg, rcRet) AssertReleaseMsgReturn(RT_SUCCESS_NP(rc), msg, rcRet)1736 1737 /** @def AssertReleaseMsgRCReturnVoid1738 * Asserts a iprt status code successful.1739 *1740 * On failure a custom message is printed, a breakpoint is hit, and finally1741 * returning from the function if the breakpoint is showhow ignored.1742 *1743 * @param rc iprt status code.1744 * @param msg printf argument list (in parenthesis).1745 * @remark rc is references multiple times.1746 */1747 #define AssertReleaseMsgRCReturnVoid(rc, msg) AssertReleaseMsgReturnVoid(RT_SUCCESS_NP(rc), msg)1748 1749 /** @def AssertReleaseMsgRCBreakStmt1750 * Asserts a iprt status code successful.1751 *1752 * On failure a custom message is printed, a breakpoint is hit, and finally1753 * the brean statement is issued if the breakpoint is showhow ignored.1754 *1755 * @param rc iprt status code.1756 * @param msg printf argument list (in parenthesis).1757 * @param stmt Statement to execute before break in case of a failed assertion.1758 * @remark rc is references multiple times.1759 */1760 #define AssertReleaseMsgRCBreakStmt(rc, msg, stmt) AssertReleaseMsgBreakStmt(RT_SUCCESS_NP(rc), msg, stmt)1761 1762 /** @def AssertReleaseMsgRCBreakVoid1763 * Asserts a iprt status code successful.1764 *1765 * On failure a custom message is printed, a breakpoint is hit, and finally1766 * breaking the current status if the breakpoint is showhow ignored.1767 *1768 * @param rc iprt status code.1769 * @param msg printf argument list (in parenthesis).1770 * @remark rc is references multiple times.1771 * @todo Rename to AssertReleaseMsgRCBreak.1772 */1773 #define AssertReleaseMsgRCBreakVoid(rc, msg) AssertReleaseMsgBreak(RT_SUCCESS(rc), msg)1774 1775 /** @def AssertReleaseRCSuccess1776 * Asserts that an iprt status code equals VINF_SUCCESS.1777 *1778 * On failure information about the error will be printed and a breakpoint hit.1779 *1780 * @param rc iprt status code.1781 * @remark rc is references multiple times.1782 */1783 #define AssertReleaseRCSuccess(rc) AssertReleaseMsg((rc) == VINF_SUCCESS, ("%Vra\n", (rc)))1784 1785 /** @def AssertReleaseRCSuccessReturn1786 * Asserts that an iprt status code equals VINF_SUCCESS.1787 *1788 * On failure information about the error will be printed, a breakpoint hit1789 * and finally returning from the function if the breakpoint is somehow ignored.1790 *1791 * @param rc iprt status code.1792 * @param rcRet What is to be presented to return.1793 * @remark rc is references multiple times.1794 */1795 #define AssertReleaseRCSuccessReturn(rc, rcRet) AssertReleaseMsgReturn((rc) == VINF_SUCCESS, ("%Vra\n", (rc)), rcRet)1796 1797 /** @def AssertReleaseRCSuccessReturnVoid1798 * Asserts that an iprt status code equals VINF_SUCCESS.1799 *1800 * On failure information about the error will be printed, a breakpoint hit1801 * and finally returning from the function if the breakpoint is somehow ignored.1802 *1803 * @param rc iprt status code.1804 * @remark rc is references multiple times.1805 */1806 #define AssertReleaseRCSuccessReturnVoid(rc) AssertReleaseMsgReturnVoid((rc) == VINF_SUCCESS, ("%Vra\n", (rc)))1807 1808 /** @def AssertReleaseRCSuccessBreakStmt1809 * Asserts that an iprt status code equals VINF_SUCCESS.1810 *1811 * On failure information about the error will be printed, a breakpoint hit1812 * and finally the break statement will be issued if the breakpoint is somehow ignored.1813 *1814 * @param rc iprt status code.1815 * @param stmt Statement to execute before break in case of a failed assertion.1816 * @remark rc is references multiple times.1817 */1818 #define AssertReleaseRCSuccessBreakStmt(rc, stmt) AssertReleaseMsgBreakStmt((rc) == VINF_SUCCESS, ("%Vra\n", (rc)), stmt)1819 1820 /** @def AssertReleaseRCSuccessBreakVoid1821 * Asserts that an iprt status code equals VINF_SUCCESS.1822 *1823 * On failure information about the error will be printed, a breakpoint hit1824 * and finally breaking the current statement if the breakpoint is somehow ignored.1825 *1826 * @param rc iprt status code.1827 * @remark rc is references multiple times.1828 * @todo Rename to AssertReleaseRCSuccessBreak.1829 */1830 #define AssertReleaseRCSuccessBreakVoid(rc) AssertReleaseMsgBreak((rc) == VINF_SUCCESS, ("%Vra\n", (rc)))1831 1832 1833 /** @def AssertFatalRC1834 * Asserts a iprt status code successful.1835 *1836 * On failure information about the error will be printed and a breakpoint hit.1837 *1838 * @param rc iprt status code.1839 * @remark rc is references multiple times.1840 */1841 #define AssertFatalRC(rc) AssertFatalMsgRC(rc, ("%Vra\n", (rc)))1842 1843 /** @def AssertReleaseMsgRC1844 * Asserts a iprt status code successful.1845 *1846 * On failure a custom message is printed and a breakpoint is hit.1847 *1848 * @param rc iprt status code.1849 * @param msg printf argument list (in parenthesis).1850 * @remark rc is references multiple times.1851 */1852 1851 #define AssertFatalMsgRC(rc, msg) AssertFatalMsg(RT_SUCCESS_NP(rc), msg) 1853 1852
Note:
See TracChangeset
for help on using the changeset viewer.