Skip to content

Commit

Permalink
exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hugopendlebury committed Apr 25, 2024
1 parent 37f2506 commit 2ec0a33
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/exceptions/codesgetdoublevaluesasarrayexception.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

class CodesGetDoubleValuesAsArrayException : public std::runtime_error
{
public:

CodesGetDoubleValuesAsArrayException(std::string errorDetails) : std::runtime_error("Exception " + errorDetails) { }

};
9 changes: 9 additions & 0 deletions src/exceptions/memoryallocationexception.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

class MemoryAllocationException : public std::runtime_error
{
public:

MemoryAllocationException(std::string errorDetails) : std::runtime_error("Exception " + errorDetails) { }

};
9 changes: 9 additions & 0 deletions src/gridarea.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "gridarea.hpp"
#include <sstream>

ostream& operator<<(ostream &os, const GridArea &a) {
return (os << "\n lat1:" << a.m_longitudeOfFirstPoint
<< "\n lon1: " << a.m_longitudeOfFirstPoint
<< "\n lat2: " << a.m_latitudeOfLastPoint
<< "\n lon2: " << a.m_longitudeOfLastPoint << std::endl);
}

0 comments on commit 2ec0a33

Please sign in to comment.