File tree Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Original file line number Diff line number Diff line change 1
1
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
2
- # Last modified by David J Turner (turne540@msu.edu) 26/03 /2025, 18:04 . Copyright (c) The Contributors
2
+ # Last modified by David J Turner (turne540@msu.edu) 25/08 /2025, 13:58 . Copyright (c) The Contributors
3
3
4
4
5
5
class HeasoftError (Exception ):
@@ -648,4 +648,42 @@ def __str__(self):
648
648
if self .message :
649
649
return '{}' .format (self .message )
650
650
else :
651
- return 'FitConfNotAssociatedError has been raised'
651
+ return 'FitConfNotAssociatedError has been raised'
652
+
653
+ class NoTelescopeDataError (Exception ):
654
+ def __init__ (self , * args ):
655
+ """
656
+ Raised when a part of XGA that directly accesses telescope data is used, but there are no relevant
657
+ telescopes setup in the configuration file.
658
+ :param expression:
659
+ :param message:
660
+ """
661
+ if args :
662
+ self .message = args [0 ]
663
+ else :
664
+ self .message = None
665
+
666
+ def __str__ (self ):
667
+ if self .message :
668
+ return '{}' .format (self .message )
669
+ else :
670
+ return 'NoTelescopeDataError has been raised'
671
+
672
+
673
+ class InvalidTelescopeError (Exception ):
674
+ def __init__ (self , * args ):
675
+ """
676
+ Raised when the name of a telescope has been passed to a function, but it is not recognised or supported.
677
+ :param expression:
678
+ :param message:
679
+ """
680
+ if args :
681
+ self .message = args [0 ]
682
+ else :
683
+ self .message = None
684
+
685
+ def __str__ (self ):
686
+ if self .message :
687
+ return '{}' .format (self .message )
688
+ else :
689
+ return 'InvalidTelescopeError has been raised'
You can’t perform that action at this time.
0 commit comments