mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 20:29:17 +00:00
arcm:: hr_archimedean_error as an exception
This commit is contained in:
parent
0cad3a55f9
commit
3bf17c12f7
@ -15,6 +15,10 @@ EX namespace arcm {
|
|||||||
EX bool in() { return cgflags & qARCHI; }
|
EX bool in() { return cgflags & qARCHI; }
|
||||||
|
|
||||||
#if HDR
|
#if HDR
|
||||||
|
struct hr_archimedean_error : hr_exception {
|
||||||
|
hr_archimedean_error(string _s) : hr_exception(_s) {}
|
||||||
|
};
|
||||||
|
|
||||||
struct archimedean_tiling {
|
struct archimedean_tiling {
|
||||||
|
|
||||||
int coloring;
|
int coloring;
|
||||||
@ -873,11 +877,11 @@ void connectHeptagons(heptspin hi, heptspin hs) {
|
|||||||
}
|
}
|
||||||
if(hi.peek()) {
|
if(hi.peek()) {
|
||||||
DEBB(DF_GEOM, (format("ERROR: already connected left\n")));
|
DEBB(DF_GEOM, (format("ERROR: already connected left\n")));
|
||||||
exit(1);
|
throw hr_archimedean_error("Archimedean error: already connected left");
|
||||||
}
|
}
|
||||||
if(hs.peek()) {
|
if(hs.peek()) {
|
||||||
DEBB(DF_GEOM, (format("ERROR: already connected right\n")));
|
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);
|
hi.at->c.connect(hi.spin, hs);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user