Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
34f7de88
Commit
34f7de88
authored
8 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
OcciRset::columnUint64() now clearly reports unexpected NULL values
parent
4f9423e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
catalogue/CMakeLists.txt
+1
-0
1 addition, 0 deletions
catalogue/CMakeLists.txt
catalogue/OcciRset.cpp
+4
-0
4 additions, 0 deletions
catalogue/OcciRset.cpp
catalogue/UserError.hpp
+1
-1
1 addition, 1 deletion
catalogue/UserError.hpp
with
6 additions
and
1 deletion
catalogue/CMakeLists.txt
+
1
−
0
View file @
34f7de88
...
...
@@ -35,6 +35,7 @@ set (CATALOGUE_LIB_SRC_FILES
InMemoryCatalogue.cpp
InMemoryCatalogueSchema.cpp
TapeFileWritten.cpp
NullDbValue.cpp
OcciConn.cpp
OcciEnv.cpp
OcciEnvSingleton.cpp
...
...
This diff is collapsed.
Click to expand it.
catalogue/OcciRset.cpp
+
4
−
0
View file @
34f7de88
...
...
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"catalogue/NullDbValue.hpp"
#include
"catalogue/OcciRset.hpp"
#include
"catalogue/OcciStmt.hpp"
#include
"common/exception/Exception.hpp"
...
...
@@ -163,6 +164,9 @@ uint64_t OcciRset::columnUint64(const std::string &colName) const {
const
int
colIdx
=
m_colNameToIdx
.
getIdx
(
colName
);
const
std
::
string
stringValue
=
m_rset
->
getString
(
colIdx
);
if
(
stringValue
.
empty
())
{
throw
NullDbValue
(
std
::
string
(
"Database column "
)
+
colName
+
" contains a NULL value"
);
}
if
(
!
utils
::
isValidUInt
(
stringValue
))
{
throw
exception
::
Exception
(
std
::
string
(
"Column "
)
+
colName
+
" contains the value "
+
stringValue
+
" which is not a valid unsigned integer"
);
...
...
This diff is collapsed.
Click to expand it.
catalogue/UserError.hpp
+
1
−
1
View file @
34f7de88
...
...
@@ -39,7 +39,7 @@ public:
*/
UserError
(
const
std
::
string
&
context
=
""
,
const
bool
embedBacktrace
=
true
);
};
// class
DbLogin
};
// class
UserError
}
// namespace catalogue
}
// namespace cta
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment