1 /* $OpenBSD: exceptions.cc,v 1.1 2007/01/28 19:10:06 kettenis Exp $ */ 2 /* 3 * Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain 4 */ 5 6 #include <cstring> 7 8 int main()9main() 10 { 11 try { 12 throw("foo"); 13 } 14 catch(const char *p) { 15 if (!strcmp(p, "foo")) 16 return (0); 17 } 18 return (1); 19 } 20