You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the attached snippet from bibtex.go:274 log.Fatalf is called to handle an undefined situation.
This gives the caller no chance to recover. I think this should be at least replaced with a panic instead.
Ideally, we could get some more robust error handling that i.e. returns invalid entries.
I tried to look into implementing this but failed to go generate bibtex.y.go using modernc.org/goyacc.
Is this the tool you used for generation?
// GetStringVar looks up a string by its key.func (bib*BibTex) GetStringVar(keystring) *BibVar {
ifbv, ok:=bib.StringVar[key]; ok {
returnbv
}
ifv, ok:=bib.getDefaultVar(key); ok {
returnv
}
// This is undefined.log.Fatalf("%s: %s", ErrUnknownStringVar, key)
returnnil
}
Example triggering the log.Fatalf. (I know that this is invalid bibtex)
@misc{inteSDM,
title={a},
author={b},
year={2019},
month = May
}
In the attached snippet from
bibtex.go:274
log.Fatalf is called to handle an undefined situation.This gives the caller no chance to recover. I think this should be at least replaced with a panic instead.
Ideally, we could get some more robust error handling that i.e. returns invalid entries.
I tried to look into implementing this but failed to go generate
bibtex.y.go
usingmodernc.org/goyacc
.Is this the tool you used for generation?
Example triggering the log.Fatalf. (I know that this is invalid bibtex)
Error message from go generate
The text was updated successfully, but these errors were encountered: