arcm:: hr_archimedean_error as an exception

This commit is contained in:
Zeno Rogue 2021-07-04 09:32:29 +02:00
parent 0cad3a55f9
commit 3bf17c12f7
1 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,10 @@ EX namespace arcm {
EX bool in() { return cgflags & qARCHI; }
#if HDR
struct hr_archimedean_error : hr_exception {
hr_archimedean_error(string _s) : hr_exception(_s) {}
};
struct archimedean_tiling {
int coloring;
@ -873,11 +877,11 @@ void connectHeptagons(heptspin hi, heptspin hs) {
}
if(hi.peek()) {
DEBB(DF_GEOM, (format("ERROR: already connected left\n")));
exit(1);
throw hr_archimedean_error("Archimedean error: already connected left");
}
if(hs.peek()) {
DEBB(DF_GEOM, (format("ERROR: already connected right\n")));
exit(1);
throw hr_archimedean_error("Archimedean error: already connected right");
}
hi.at->c.connect(hi.spin, hs);