Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
896eef37
Commit
896eef37
authored
Jun 11, 2018
by
Lynn Garren
Browse files
catch uses reference, not copy
parent
24f15697
Changes
2
Hide whitespace changes
Inline
Side-by-side
Exceptions/test/exctest1.cc
View file @
896eef37
...
...
@@ -28,10 +28,10 @@ int main() {
cerr
<<
"Got past: ZMthrow( Oops(
\"
Ouch
\"
) ) -- not good!"
<<
endl
;
#ifndef DEFECT_NO_EXCEPTIONS
}
catch
(
const
Oops
egad
)
{
catch
(
const
Oops
&
egad
)
{
cerr
<<
"Caught: Oops"
<<
endl
;
}
catch
(
const
ZMexception
egad
)
{
catch
(
const
ZMexception
&
egad
)
{
cerr
<<
"Caught: ZMexception"
<<
endl
;
}
catch
(
...
)
{
...
...
Exceptions/test/exctest4.cc
View file @
896eef37
...
...
@@ -31,10 +31,10 @@ int main() {
cerr
<<
"Got past: ZMthrow( Oops(
\"
Ouch
\"
) ) -- not good!"
<<
endl
;
#ifndef DEFECT_NO_EXCEPTIONS
}
catch
(
const
Oops
egad
)
{
catch
(
const
Oops
&
egad
)
{
cerr
<<
"Caught: Oops"
<<
endl
;
}
catch
(
const
ZMexception
egad
)
{
catch
(
const
ZMexception
&
egad
)
{
cerr
<<
"Caught: ZMexception"
<<
endl
;
}
catch
(
...
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment