diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-08-13 16:29:14 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-08-14 17:03:46 -0700 |
commit | 6e06e55b95fdb9070d32d44786441255871dbb0b (patch) | |
tree | d9e074da720f8339966c99ded803f4f59a83b68e /bin | |
parent | 89515de769aea0b54a800514f7deaf65649d9d54 (diff) | |
download | qtlocation-mapboxgl-6e06e55b95fdb9070d32d44786441255871dbb0b.tar.gz |
WIP: use expected<T, E> for passing on errors
Diffstat (limited to 'bin')
-rw-r--r-- | bin/offline.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/offline.cpp b/bin/offline.cpp index 8b42ab7b72..603f0b848a 100644 --- a/bin/offline.cpp +++ b/bin/offline.cpp @@ -136,9 +136,9 @@ int main(int argc, char *argv[]) { std::signal(SIGINT, [] (int) { stop(); }); - fileSource.createOfflineRegion(definition, metadata, [&] (std::exception_ptr error, optional<OfflineRegion> region_) { - if (error) { - std::cerr << "Error creating region: " << util::toString(error) << std::endl; + fileSource.createOfflineRegion(definition, metadata, [&] (mbgl::expected<OfflineRegion, std::exception_ptr> region_) { + if (!region_) { + std::cerr << "Error creating region: " << util::toString(region_.error()) << std::endl; loop.stop(); exit(1); } else { |