Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
RequiredComponentVersionMismatchException.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#include "Stroika/Foundation/StroikaPreComp.h"
5
8
9#include "RequiredComponentVersionMismatchException.h"
10
11using namespace Stroika::Foundation;
12using namespace Stroika::Foundation::Execution;
13
14/*
15 ********************************************************************************
16 ****************** RequiredComponentVersionMismatchException *******************
17 ********************************************************************************
18 */
19namespace {
20 wstring mkMsg (const wstring& component, const wstring& requiredVersion)
21 {
22 wstring x = Characters::CString::Format (L"A required component - %s - is missing, or is out of date", component.c_str ());
23 if (not requiredVersion.empty ()) {
24 x += Characters::CString::Format (L"; version '%s' is required", requiredVersion.c_str ());
25 }
26 return x;
27 }
28}
29RequiredComponentVersionMismatchException::RequiredComponentVersionMismatchException (const wstring& component, const wstring& requiredVersion)
30 : Execution::RuntimeErrorException<> (mkMsg (component, requiredVersion))
31{
32}