@@ -11,8 +11,11 @@ void gridder_t::cache_manager_t::write_model(const model_t& model) {
11
11
file::write (cache_file, model.flux );
12
12
13
13
if (!cache_file) {
14
+ print (" " );
14
15
warning (" could not write to cache file anymore" );
15
16
warning (" in case you ran out of disk space, the cache file has been removed" );
17
+ print (" " );
18
+
16
19
cache_file.close ();
17
20
file::remove (cache_filename);
18
21
}
@@ -370,9 +373,11 @@ public :
370
373
lib.read (&extras (i,0 ), ntime);
371
374
}
372
375
} catch (...) {
376
+ print (" " );
373
377
error (" could not read data in library file '" , filename, " '" );
374
378
error (" could not " , state);
375
379
error (" the file is probably corrupted, try re-downloading it" );
380
+ print (" " );
376
381
return false ;
377
382
}
378
383
@@ -521,8 +526,10 @@ bool gridder_t::build_and_send(fitter_t& fitter) {
521
526
for (uint_t iz : range (output.z )) {
522
527
if (cache.read_model (model)) {
523
528
if (model.igrid != model_id (im, it, ia, id, iz)) {
529
+ print (" " );
524
530
error (" data in the cache file are not what was expected" );
525
531
error (" the cache is probably corrupted, please remove it and try again" );
532
+ print (" " );
526
533
return false ;
527
534
}
528
535
@@ -534,8 +541,10 @@ bool gridder_t::build_and_send(fitter_t& fitter) {
534
541
535
542
if (opts.verbose ) progress (pg, 131 );
536
543
} else {
544
+ print (" " );
537
545
error (" could not read data from cache file" );
538
546
error (" the cache is probably corrupted, please remove it and try again" );
547
+ print (" " );
539
548
return false ;
540
549
}
541
550
}
@@ -554,7 +563,12 @@ bool gridder_t::build_and_send(fitter_t& fitter) {
554
563
}
555
564
556
565
// Make sure input is correct
557
- phypp_check (is_sorted (ised.age ), " galaxev age array is not sorted: " , ised.age );
566
+ if (!is_sorted (ised.age )) {
567
+ print (" " );
568
+ error (" galaxev age array is not sorted" );
569
+ print (" " );
570
+ return false ;
571
+ }
558
572
559
573
// Pre-compute dust law
560
574
vec1d dust_law = build_dust_law (ised.lambda );
@@ -573,13 +587,17 @@ bool gridder_t::build_and_send(fitter_t& fitter) {
573
587
double nage = e10 (output.age [ia]);
574
588
auto p = bounds (nage, ised.age );
575
589
if (p[0 ] == npos) {
590
+ print (" " );
576
591
error (" requested age is lower than allowed by the template library (" ,
577
592
output.age [ia], " vs. " , log10 (ised.age .safe [p[1 ]]), " )" );
593
+ print (" " );
578
594
return false ;
579
595
} else if (p[1 ] == npos) {
580
596
if (nage > ised.age .safe [p[0 ]]) {
597
+ print (" " );
581
598
error (" requested age is larger than allowed by the template library (" ,
582
599
output.age [ia], " vs. " , log10 (ised.age .safe [p[0 ]]), " )" );
600
+ print (" " );
583
601
return false ;
584
602
}
585
603
@@ -662,20 +680,29 @@ bool gridder_t::build_template(uint_t im, uint_t it, uint_t ia, uint_t id, uint_
662
680
}
663
681
664
682
// Make sure input is correct
665
- phypp_check (is_sorted (ised.age ), " galaxev age array is not sorted: " , ised.age );
683
+ if (!is_sorted (ised.age )) {
684
+ print (" " );
685
+ error (" galaxev age array is not sorted" );
686
+ print (" " );
687
+ return false ;
688
+ }
666
689
667
690
// Interpolate the galaxev grid at the requested age
668
691
double nage = e10 (output.age [ia]);
669
692
auto p = bounds (nage, ised.age );
670
693
double mass = 0 ;
671
694
if (p[0 ] == npos) {
695
+ print (" " );
672
696
error (" requested age is lower than allowed by the template library (" ,
673
697
output.age [ia], " vs. " , log10 (ised.age [p[1 ]]), " )" );
698
+ print (" " );
674
699
return false ;
675
700
} else if (p[1 ] == npos) {
676
701
if (nage > ised.age [p[0 ]]) {
702
+ print (" " );
677
703
error (" requested age is larger than allowed by the template library (" ,
678
704
output.age [ia], " vs. " , log10 (ised.age [p[0 ]]), " )" );
705
+ print (" " );
679
706
return false ;
680
707
}
681
708
0 commit comments