Mercurial > hg > orthanc-databases
comparison MySQL/Plugins/MySQLIndex.cpp @ 24:17f849b2af34
sharing plugin initialization code
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Jul 2018 12:17:39 +0200 |
parents | b2ff1cd2907a |
children | 71eca9b0442a |
comparison
equal
deleted
inserted
replaced
23:b2ff1cd2907a | 24:17f849b2af34 |
---|---|
54 << "expecting the DB schema version " << expectedVersion | 54 << "expecting the DB schema version " << expectedVersion |
55 << ", but this plugin is only compatible with version 6"; | 55 << ", but this plugin is only compatible with version 6"; |
56 throw Orthanc::OrthancException(Orthanc::ErrorCode_Plugin); | 56 throw Orthanc::OrthancException(Orthanc::ErrorCode_Plugin); |
57 } | 57 } |
58 | 58 |
59 if (!MySQLDatabase::IsAlphanumericString(parameters_.GetDatabase())) | |
60 { | |
61 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | |
62 } | |
63 | |
59 if (clearAll_) | 64 if (clearAll_) |
60 { | 65 { |
61 MySQLDatabase::ClearDatabase(parameters_); | 66 MySQLDatabase::ClearDatabase(parameters_); |
62 } | 67 } |
63 | 68 |