Skip to content

Commit

Permalink
Move FatalError to its own header.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jun 28, 2024
1 parent b450533 commit 2fcf143
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
16 changes: 1 addition & 15 deletions untwine/Common.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#pragma once

#ifdef _WIN32
#include <Windows.h>
#include <io.h>
#else
#include <unistd.h>
#include <sys/mman.h>
#endif

#include <stdint.h>
#include <array>
#include <limits>
Expand All @@ -18,6 +10,7 @@
#include <pdal/SpatialReference.hpp>
#include <pdal/util/Bounds.hpp>

#include "FatalError.hpp"
#include "FileDimInfo.hpp"

namespace untwine
Expand All @@ -29,13 +22,6 @@ const int CellCount = 128;
using PointCount = uint64_t;
using StringList = std::vector<std::string>;

class FatalError : public std::runtime_error
{
public:
inline FatalError(std::string const& msg) : std::runtime_error(msg)
{}
};

struct Options
{
std::string outputName;
Expand Down
15 changes: 15 additions & 0 deletions untwine/FatalError.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include <stdexcept>

namespace untwine
{

class FatalError : public std::runtime_error
{
public:
inline FatalError(std::string const& msg) : std::runtime_error(msg)
{}
};

} // namespace untwine
2 changes: 2 additions & 0 deletions untwine/windows/stringconv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <Windows.h>

#include <FatalError.hpp>

namespace untwine
{
namespace os
Expand Down

0 comments on commit 2fcf143

Please sign in to comment.