comparison Framework/Plugins/IndexBackend.cpp @ 505:38e428f8179d

more detailed error messages
author Alain Mazy <am@orthanc.team>
date Fri, 24 May 2024 16:39:38 +0200
parents f0976163dbe1
children 54d518dcd74a
comparison
equal deleted inserted replaced
504:fe1897618c08 505:38e428f8179d
758 758
759 statement.Execute(args); 759 statement.Execute(args);
760 760
761 if (statement.IsDone()) 761 if (statement.IsDone())
762 { 762 {
763 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); 763 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "No public id found for internal id");
764 } 764 }
765 else 765 else
766 { 766 {
767 return statement.ReadString(0); 767 return statement.ReadString(0);
768 } 768 }
826 826
827 statement.Execute(args); 827 statement.Execute(args);
828 828
829 if (statement.IsDone()) 829 if (statement.IsDone())
830 { 830 {
831 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource); 831 throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource, "No resource type found for internal id.");
832 } 832 }
833 else 833 else
834 { 834 {
835 return static_cast<OrthancPluginResourceType>(statement.ReadInteger32(0)); 835 return static_cast<OrthancPluginResourceType>(statement.ReadInteger32(0));
836 } 836 }