Add more error checks on taxonomy reading

Former-commit-id: 30c848d8e61214afcc7d92f0d3a3f5a1474fc720
This commit is contained in:
2023-12-14 08:09:06 +01:00
parent 2caaa62485
commit b9a7961c91
3 changed files with 25 additions and 3 deletions

View File

@ -11,6 +11,14 @@ import (
)
func (t1 *TaxNode) LCA(t2 *TaxNode) (*TaxNode, error) {
if t1 == nil {
log.Fatalf("Try to get LCA of nil taxon")
}
if t2 == nil {
log.Fatalf("Try to get LCA of nil taxon")
}
p1, err1 := t1.Path()
if err1 != nil {