diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-12-12 11:25:33 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-12-23 16:58:03 +0100 |
commit | 74feef4718770d20273aa97f9176484149f178ae (patch) | |
tree | d7c52cb57a60cc85d6326901cc71ff09986f11a4 /src/SparseMatrixProjectionGeometry2D.cpp | |
parent | 8220a50be6bcbddf179bb855b2f7d36436fcca6b (diff) | |
download | astra-74feef4718770d20273aa97f9176484149f178ae.tar.gz astra-74feef4718770d20273aa97f9176484149f178ae.tar.bz2 astra-74feef4718770d20273aa97f9176484149f178ae.tar.xz astra-74feef4718770d20273aa97f9176484149f178ae.zip |
Improve config error handling
Diffstat (limited to 'src/SparseMatrixProjectionGeometry2D.cpp')
-rw-r--r-- | src/SparseMatrixProjectionGeometry2D.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SparseMatrixProjectionGeometry2D.cpp b/src/SparseMatrixProjectionGeometry2D.cpp index b55a282..e8165a3 100644 --- a/src/SparseMatrixProjectionGeometry2D.cpp +++ b/src/SparseMatrixProjectionGeometry2D.cpp @@ -93,12 +93,13 @@ bool CSparseMatrixProjectionGeometry2D::initialize(const Config& _cfg) ConfigStackCheck<CProjectionGeometry2D> CC("SparseMatrixProjectionGeometry2D", this, _cfg); // initialization of parent class - CProjectionGeometry2D::initialize(_cfg); + if (!CProjectionGeometry2D::initialize(_cfg)) + return false; // get matrix XMLNode node = _cfg.self.getSingleNode("MatrixID"); ASTRA_CONFIG_CHECK(node, "SparseMatrixProjectionGeometry2D", "No MatrixID tag specified."); - int id = node.getContentInt(); + int id = StringUtil::stringToInt(node.getContent(), -1); m_pMatrix = CMatrixManager::getSingleton().get(id); CC.markNodeParsed("MatrixID"); |