Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
resource loading: reporting include (+glob) error
Browse files Browse the repository at this point in the history
  • Loading branch information
vaclavblazek committed Apr 6, 2023
1 parent bde1640 commit 7cc654b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 138 deletions.
2 changes: 1 addition & 1 deletion externals/libutility
Submodule libutility updated 1 files
+6 −3 utility/glob.cpp
1 change: 0 additions & 1 deletion mapproxy/src/mapproxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ set(mapproxy-core_SOURCES
support/introspection.hpp support/introspection.cpp
support/serialization.cpp
support/aborter.hpp
support/glob.hpp support/glob.cpp
support/tilejson.hpp support/tilejson.cpp
support/cesiumconf.hpp support/cesiumconf.cpp
support/wmts.hpp support/wmts.cpp
Expand Down
19 changes: 12 additions & 7 deletions mapproxy/src/mapproxy/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

#include "dbglog/dbglog.hpp"

#include "utility/glob.hpp"

#include "jsoncpp/json.hpp"
#include "jsoncpp/as.hpp"
#include "jsoncpp/io.hpp"

#include "vts-libs/registry/json.hpp"
#include "vts-libs/vts/tileop.hpp"

#include "support/glob.hpp"

#include "error.hpp"
#include "resource.hpp"
#include "generator.hpp"
Expand Down Expand Up @@ -254,11 +254,16 @@ void parseResources(Resource::map &resources, const Json::Value &value
{
const auto includePath(fs::absolute(value, dir));

auto paths(globPath(includePath));
for (const auto &path : paths) {
// ignore directories
if (path.filename() == ".") { continue; }
includeLoad(path);
try {
for (const auto &path : utility::globPath(includePath)) {
// ignore directories
if (path.filename() == ".") { continue; }
includeLoad(path);
}
} catch (const std::exception &e) {
LOGTHROW(err3, std::runtime_error)
<< "Failed to include file(s) from " << path
<< ": " << e.what() << ".";
}
});

Expand Down
83 changes: 0 additions & 83 deletions mapproxy/src/mapproxy/support/glob.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions mapproxy/src/mapproxy/support/glob.hpp

This file was deleted.

0 comments on commit 7cc654b

Please sign in to comment.