comparison Core/SharedLibrary.cpp @ 2954:d924f9bb61cc

taking advantage of details in OrthancException
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:35:34 +0100
parents be5c0f4155f6
children 4e43e67f8ecf
comparison
equal deleted inserted replaced
2953:210d5afd8f2b 2954:d924f9bb61cc
117 { 117 {
118 SharedLibrary::FunctionPointer result = GetFunctionInternal(name); 118 SharedLibrary::FunctionPointer result = GetFunctionInternal(name);
119 119
120 if (result == NULL) 120 if (result == NULL)
121 { 121 {
122 LOG(ERROR) << "Shared library does not expose function \"" << name << "\""; 122 throw OrthancException(
123 throw OrthancException(ErrorCode_SharedLibrary); 123 ErrorCode_SharedLibrary,
124 "Shared library does not expose function \"" + name + "\"");
124 } 125 }
125 else 126 else
126 { 127 {
127 return result; 128 return result;
128 } 129 }