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 $
13 ** scaffolding for testing exception handler code
19 # include <sm/debug.h>
22 extern SM_ATOMIC_UINT_T SmXtrapCount;
23 extern SM_DEBUG_T SmXtrapDebug;
24 extern SM_DEBUG_T SmXtrapReport;
27 # define sm_xtrap_check() (++SmXtrapCount == sm_debug_level(&SmXtrapDebug))
28 # else /* SM_DEBUG_CHECK */
29 # define sm_xtrap_check() (0)
30 # endif /* SM_DEBUG_CHECK */
32 # define sm_xtrap_raise_x(exc) \
33 if (sm_xtrap_check()) \
35 sm_exc_raise_x(exc); \
38 #endif /* ! SM_XTRAP_H */