2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
9 * $Id: xtrap.h,v 1.7 2001/04/03 01:53:01 gshapiro Exp $
12 #pragma ident "%Z%%M% %I% %E% SMI"
15 ** scaffolding for testing exception handler code
21 # include <sm/debug.h>
24 extern SM_ATOMIC_UINT_T SmXtrapCount
;
25 extern SM_DEBUG_T SmXtrapDebug
;
26 extern SM_DEBUG_T SmXtrapReport
;
29 # define sm_xtrap_check() (++SmXtrapCount == sm_debug_level(&SmXtrapDebug))
30 # else /* SM_DEBUG_CHECK */
31 # define sm_xtrap_check() (0)
32 # endif /* SM_DEBUG_CHECK */
34 # define sm_xtrap_raise_x(exc) \
35 if (sm_xtrap_check()) \
37 sm_exc_raise_x(exc); \
40 #endif /* ! SM_XTRAP_H */