diff options
author | lloyd <[email protected]> | 2008-11-11 19:07:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-11 19:07:34 +0000 |
commit | 1954e73dbf4e4984d33a45d6ce05ee5aecb84714 (patch) | |
tree | 99e94a3c1f28d1f794f928eabfa817f5042348aa /src/utils/scan_name.cpp | |
parent | 1befa604ad62332aab1729d023c89556e63332c7 (diff) |
Throw an exception if SCAN name is malformed or empty
Diffstat (limited to 'src/utils/scan_name.cpp')
-rw-r--r-- | src/utils/scan_name.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/scan_name.cpp b/src/utils/scan_name.cpp index e32110740..f5a1a9245 100644 --- a/src/utils/scan_name.cpp +++ b/src/utils/scan_name.cpp @@ -47,6 +47,9 @@ SCAN_Name::SCAN_Name(const std::string& algo_spec, m_provider = provider; name = parse_and_deref_aliases(algo_spec); + + if(name.size() == 0) + throw Decoding_Error("Bad SCAN name " + algo_spec); } SCAN_Name SCAN_Name::arg(u32bit i) const |