aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-03-03 13:03:09 +0100
committerThomas White <taw@physics.org>2017-03-03 13:03:09 +0100
commit3a500079e43937e7a17ef02f09a875dd63c6ef4d (patch)
treeb44ecd8cf5a02e8be3fade80c0b3c62f3fd7bfbe
parente3c6d8e8aec84f708e1098371ecb4621ad17223f (diff)
cell_explorer: Better handling of dodgy cells
-rw-r--r--src/cell_explorer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cell_explorer.c b/src/cell_explorer.c
index c8bbb069..f6c2c590 100644
--- a/src/cell_explorer.c
+++ b/src/cell_explorer.c
@@ -658,7 +658,9 @@ static void scan_cells(CellWindow *w)
if ( ignore ) continue;
- cell_get_parameters(cells[i], &a, &b, &c, &al, &be, &ga);
+ if ( cell_get_parameters(cells[i], &a, &b, &c, &al, &be, &ga) ) {
+ continue;
+ }
a *= 1e10; b *= 1e10; c *= 1e10;
al = rad2deg(al); be = rad2deg(be); ga = rad2deg(ga);
@@ -719,7 +721,10 @@ static void scan_minmax(CellWindow *w)
int j;
int found = 0;
- cell_get_parameters(w->cells[i], &a, &b, &c, &al, &be, &ga);
+ if ( cell_get_parameters(w->cells[i], &a, &b, &c, &al, &be, &ga) ) {
+ ERROR("Cell %i is bad\n", i);
+ continue;
+ }
a *= 1e10; b *= 1e10; c *= 1e10;
al = rad2deg(al); be = rad2deg(be); ga = rad2deg(ga);
@@ -1555,6 +1560,8 @@ int main(int argc, char *argv[])
return 1;
}
+ gsl_set_error_handler_off();
+
w.cells = NULL;
w.indms = NULL;
w.n_cells = 0;