summaryrefslogtreecommitdiffstats
path: root/regress/misc/exceptions/simple/exceptions.cc
blob: 35a619500b07de086fa9437aade9a0dea0bab2eb (plain) (blame)
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 2007/01/28 19:10:06 kettenis 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);
}