summaryrefslogtreecommitdiff
path: root/regress/misc/exceptions/exceptions.cc
blob: 273a88a287e3a52a4f2e98e03cccd3646fdef79f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*	$OpenBSD: exceptions.cc,v 1.1 2002/12/04 05:02:15 art Exp $	*/
/*
 *	Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain
 */

#include <cstring>

int
main()
{
	try {
		throw("foo");
        }
	catch(const char *p) {
		if (!strcmp(p, "foo"))
			return (0);
	}
	return (1);
}