Coverage for src/python/ensembl/io/genomio/gff3/exceptions.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-02-21 15:37 +0000

1# See the NOTICE file distributed with this work for additional information 

2# regarding copyright ownership. 

3# 

4# Licensed under the Apache License, Version 2.0 (the "License"); 

5# you may not use this file except in compliance with the License. 

6# You may obtain a copy of the License at 

7# 

8# http://www.apache.org/licenses/LICENSE-2.0 

9# 

10# Unless required by applicable law or agreed to in writing, software 

11# distributed under the License is distributed on an "AS IS" BASIS, 

12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

13# See the License for the specific language governing permissions and 

14# limitations under the License. 

15"""GFF parsing exceptions.""" 

16 

17__all__ = [ 

18 "GeneSegmentError", 

19 "GFFParserError", 

20 "IgnoredFeatureError", 

21 "UnsupportedFeatureError", 

22] 

23 

24 

25class GFFParserError(Exception): 

26 """Error when parsing a GFF3 file.""" 

27 

28 def __init__(self, message: str) -> None: 

29 super().__init__(message) 

30 self.message = message 

31 

32 

33class GeneSegmentError(GFFParserError): 

34 """GFF3 gene segment parsing error.""" 

35 

36 

37class IgnoredFeatureError(GFFParserError): 

38 """GFF3 feature can be ignored.""" 

39 

40 

41class UnsupportedFeatureError(GFFParserError): 

42 """GFF3 feature is not supported."""