source: trunk/testcase/throw2.cpp@ 835

Last change on this file since 835 was 835, checked in by bird, 22 years ago

Extended testcase.

  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 428 bytes
Line 
1#include <stdio.h>
2#include "throw.h"
3
4bar::bar(int i) : i(i)
5{
6 fprintf(stderr, "bar::constructor 1\n");
7}
8
9bar::bar() throw(int) : i(1)
10{
11 fprintf(stderr, "bar::constructor 2\n");
12 throw(1);
13}
14
15int bar::get() const
16{
17 return i;
18}
19
20int bar::getThrow() const throw(expt)
21{
22 throw(expt(1, ""));
23 return 1;
24}
25
26
27
28expt::expt(int i, const char *psz) : i(i), psz(psz)
29{
30
31}
32
33int expt::get() const
34{
35 return i;
36}
37
38
Note: See TracBrowser for help on using the repository browser.