Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
3ad094ff
Commit
3ad094ff
authored
Jul 12, 2013
by
Owen Arnold
Browse files
refs #7400. Change what is thrown.
parent
df1189ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/DataObjects/src/Peak.cpp
View file @
3ad094ff
...
...
@@ -821,7 +821,7 @@ namespace DataObjects
auto
det
=
getDetector
();
if
(
det
==
NULL
)
{
throw
Mantid
::
Kernel
::
Exception
::
N
otFoundError
(
"Detector cannot be found."
,
"
"
);
throw
Mantid
::
Kernel
::
Exception
::
N
ullPointerException
(
"Peak"
,
"Detector
"
);
}
return
getDetector
()
->
getPos
();
}
...
...
Code/Mantid/Framework/DataObjects/test/PeakTest.h
View file @
3ad094ff
...
...
@@ -349,7 +349,7 @@ public:
Peak
p
(
inst
,
detectorId
,
wavelength
);
TSM_ASSERT_THROWS_NOTHING
(
"Nothing wrong here, detector is valid"
,
p
.
getDetectorPosition
());
p
.
setQLabFrame
(
V3D
(
1
,
1
,
1
),
1
);
// This sets the detector pointer to null and detector id to -1;
TSM_ASSERT_THROWS
(
"Detector is not valid"
,
p
.
getDetectorPosition
(),
Mantid
::
Kernel
::
Exception
::
N
otFoundError
&
);
TSM_ASSERT_THROWS
(
"Detector is not valid"
,
p
.
getDetectorPosition
(),
Mantid
::
Kernel
::
Exception
::
N
ullPointerException
&
);
}
private:
...
...
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