Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jens Krüger
Lima
Commits
dcce0723
Commit
dcce0723
authored
Sep 07, 2012
by
Sebastien Petitdemange
Browse files
Change throw with THROW macro for debug
parent
4aaf5664
Changes
1
Hide whitespace changes
Inline
Side-by-side
control/src/CtImage.cpp
View file @
dcce0723
...
...
@@ -92,9 +92,9 @@ void CtSwBinRoiFlip::setRoi(const Roi& roi)
DEB_PARAM
()
<<
DEB_VAR1
(
roi
);
if
(
roi
.
isEmpty
())
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Software roi is empty"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Software roi is empty"
;
if
(
!
m_max_roi
.
containsRoi
(
roi
))
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Roi out of limts"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Roi out of limts"
;
m_roi
=
roi
;
}
...
...
@@ -241,14 +241,14 @@ void CtHwBinRoiFlip::setBin(Bin& bin, bool round)
if
(
!
m_has_bin
)
{
if
(
!
round
)
throw
LIMA
_CTL_E
XC
(
NotSupported
,
"No hardware binning available"
)
;
THROW
_CTL_E
RROR
(
NotSupported
)
<<
"No hardware binning available"
;
}
else
{
Bin
set_bin
=
bin
;
if
(
!
set_bin
.
isOne
())
m_hw_bin
->
checkBin
(
set_bin
);
if
((
!
round
)
&&
(
set_bin
!=
bin
))
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Given hardware binning not possible"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Given hardware binning not possible"
;
if
(
set_bin
!=
m_bin
)
{
if
(
!
m_set_roi
.
isEmpty
())
m_set_roi
=
m_set_roi
.
getUnbinned
(
m_bin
);
...
...
@@ -271,19 +271,19 @@ void CtHwBinRoiFlip::setRoi(Roi& roi, bool round)
DEB_PARAM
()
<<
DEB_VAR2
(
roi
,
round
);
if
(
roi
.
isEmpty
())
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Hardware roi is empty"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Hardware roi is empty"
;
if
(
!
m_max_roi
.
containsRoi
(
roi
))
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Roi out of limts"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Roi out of limts"
;
if
(
!
m_has_roi
)
{
if
(
!
round
)
throw
LIMA
_CTL_E
XC
(
NotSupported
,
"No hardware roi available"
)
;
THROW
_CTL_E
RROR
(
NotSupported
)
<<
"No hardware roi available"
;
}
else
{
Roi
real_roi
;
m_hw_roi
->
checkRoi
(
roi
,
real_roi
);
if
((
!
round
)
&&
(
real_roi
!=
roi
))
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Given hardware roi not possible"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Given hardware roi not possible"
;
if
(
roi
!=
m_set_roi
)
{
m_hw_roi
->
setRoi
(
roi
);
m_set_roi
=
roi
;
...
...
@@ -304,7 +304,7 @@ void CtHwBinRoiFlip::setFlip(Flip& flip, bool mandatory)
if
(
!
m_has_flip
)
{
if
(
mandatory
)
throw
LIMA
_CTL_E
XC
(
NotSupported
,
"No hardware flip available"
)
;
THROW
_CTL_E
RROR
(
NotSupported
)
<<
"No hardware flip available"
;
}
else
{
...
...
@@ -312,7 +312,7 @@ void CtHwBinRoiFlip::setFlip(Flip& flip, bool mandatory)
if
(
set_flip
.
x
||
set_flip
.
y
)
m_hw_flip
->
checkFlip
(
set_flip
);
if
(
mandatory
&&
set_flip
!=
flip
)
throw
LIMA
_CTL_E
XC
(
InvalidValue
,
"Given hardware flip not possible"
)
;
THROW
_CTL_E
RROR
(
InvalidValue
)
<<
"Given hardware flip not possible"
;
if
(
set_flip
!=
m_flip
)
{
m_hw_flip
->
setFlip
(
set_flip
);
...
...
@@ -408,7 +408,7 @@ CtImage::CtImage(HwInterface *hw,CtControl &ct)
DEB_CONSTRUCTOR
();
if
(
!
hw
->
getHwCtrlObj
(
m_hw_det
))
throw
LIMA
_CTL_E
XC
(
Error
,
"Cannot get detector info object"
)
;
THROW
_CTL_E
RROR
(
Error
)
<<
"Cannot get detector info object"
;
m_hw_det
->
getMaxImageSize
(
m_max_size
);
m_hw_det
->
getCurrImageType
(
m_img_type
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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