Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPP sends invalid empty keys to g2tmpl, and g2tmpl lacks proper error handling #977

Closed
SamuelTrahanNOAA opened this issue Jun 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SamuelTrahanNOAA
Copy link
Contributor

SamuelTrahanNOAA commented Jun 17, 2024

When the post xml files lack a field, the post sends an empty string as a key to the g2tmpl library to get the numeric equivalent. The g2tmpl library expects that keys will never be empty, and it lacks error checking to handle invalid keys. Sometimes errors are reported, but the g2tmpl usually won't write anything to the output value. Some of that is invisible to the post because g2tmpl routines call other routines. (For example, the template 4.9 routines will look up the integer values of keys for each field.)

The fix for this is:

  1. UPP sends valid keys.
  2. g2tmpl has reasonable behavior for invalid keys.
  3. g2tmpl reports to UPP if any error that occurs within a subroutine call, not just the last call a subroutine makes.
@WenMeng-NOAA
Copy link
Collaborator

This issue was solved in the PR #974.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants