File: reply-pcanal-2

package info (click to toggle)
clhep 2.1.4.1%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,012 kB
  • sloc: cpp: 50,094; sh: 6,694; makefile: 2,694; perl: 28
file content (67 lines) | stat: -rwxr-xr-x 1,864 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From pcanal@fndaub  Tue Jul  8 13:42:37 1997
Received: from fndaub.fnal.gov by fncrd8.fnal.gov via ESMTP (950413.SGI.8.6.12/911001.SGI)
	for <mf@fncrd8.fnal.gov> id NAA01517; Tue, 8 Jul 1997 13:41:35 -0500
Received: from localhost by fndaub.fnal.gov via SMTP (951211.SGI.8.6.12.PATCH1042/911001.SGI)
	 id NAA13661; Tue, 8 Jul 1997 13:41:34 -0500
Message-Id: <199707081841.NAA13661@fndaub.fnal.gov>
X-Mailer: exmh version 1.6.6 3/24/96
To: mf (Mark Fischler)
cc: pcanal@fndaub
Subject: Re: ZOOM exceptions
In-reply-to: Your message of "Tue, 08 Jul 1997 10:33:49 CDT."
             <199707081533.KAA18029@fncrdn.fnal.gov>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 08 Jul 1997 13:41:34 CDT
From: Philippe Canal <pcanal@fndaub>
Status: RO

> 4 - ZMexcept has signature
>
> 	void ZMexcept ( ZMexception x, int line,
> 				char file[], char data[], char time[]);
>

This signature worries me in the following sense:

	by receiving explicitly a ZMexception, ZMExcept do not get any
type information (except for the id).
	if ZMExcept throw the exception it will throw an exception of
type ZMexception not the intended type!


------------------


I think you are right.  The first argument should be a ZMexception&.  Then
when we do
	class ZMxCapture : public ZMexception { ... }
		:
		:
	ZMexcept ( ZMxCapture ("a message"), line, file, data, time );

And
	ZMexcept ( ZMexception &x, int line,
 				char file[], char data[], char time[]) {
		:
		:
	  throw x;
	}

this will (I think) throw the ZMxCapture.  If not, we will need to make it
a ZMexception* and do:

	class ZMxCapture : public ZMexception { ... }
		:
		:
	ZMexcept ( *ZMxCapture ("a message"), line, file, data, time );

And
	ZMexcept ( ZMexception *x, int line,
 				char file[], char data[], char time[]) {
		:
		:
	  throw *x;
	}

which is less elegant but may be necessary.