Skip to content

g.region: Add more detail into error messages#1140

Merged
wenzeslaus merged 4 commits intoOSGeo:masterfrom
wenzeslaus:detail_msg_in_G_adjust_Cell_head
Dec 6, 2020
Merged

g.region: Add more detail into error messages#1140
wenzeslaus merged 4 commits intoOSGeo:masterfrom
wenzeslaus:detail_msg_in_G_adjust_Cell_head

Conversation

@wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Dec 2, 2020

Messages such as 'Illegal col value' might be sufficient for a simple g.region call,
but g.region is called at many different places indirectly and G_adjust_Cell_head, too,
so col does not make much sense anymore.

  • This uses general terms (number of columns) instead of g.region options (col value).
    G_adjust_Cell_head and G_adjust_Cell_head3 are library functions after all.
  • Uses message colon value syntax where possible.
  • Explains why the error was triggered or shows the offending value.

Messages such as 'Illegal col value' might be sufficient for a simple g.region call,
but g.region is called at many different places indirectly and G_adjust_Cell_head, too,
so col does not make much sense anymore.

* This uses general terms (number of columns) instead of g.region options (col value).
  G_adjust_Cell_head is a library function after all.
* Uses message colon value syntax where possible.
* Explains why the error was triggered or shows the offending value.
@wenzeslaus
Copy link
Member Author

Thanks @lucadelu.

The G_adjust_Cell_head3 is actually the same as G_adjust_Cell_head but with 3D additions, so I had to make changes there, too. I used similar messages, although I was not 100% sure how to formulate the 3D region/resolution messages.

@wenzeslaus wenzeslaus added the enhancement New feature or request label Dec 2, 2020
…s in the GUI or with g.region vector when extent is set separatelly from resolution and default resolution in lat-lon can ne much larger than the requested extent. Adjusting the resolution value in this case would go far beyond chanaging messages and may go beyond what should happen.
@wenzeslaus wenzeslaus merged commit e0ce155 into OSGeo:master Dec 6, 2020
@wenzeslaus wenzeslaus deleted the detail_msg_in_G_adjust_Cell_head branch December 6, 2020 04:26
wenzeslaus added a commit to wenzeslaus/grass that referenced this pull request Nov 24, 2021
When setting up region in LL, this adds the actual values to the error messages in case these are computed
in the g.region call or function call itself. The value may also provide more explanation to what was actually violated.

Similar to OSGeo#1140 (e0ce155) but for the lat-lon extent cases.
wenzeslaus added a commit that referenced this pull request Nov 24, 2021
When setting up region in LL, this adds the actual values to the error messages in case these are computed
in the g.region call or function call itself. The value may also provide more explanation to what was actually violated.

Similar to #1140 (e0ce155) but for the lat-lon extent cases.
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
When setting up region in LL, this adds the actual values to the error messages in case these are computed
in the g.region call or function call itself. The value may also provide more explanation to what was actually violated.

Similar to OSGeo#1140 (e0ce155) but for the lat-lon extent cases.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
When setting up region in LL, this adds the actual values to the error messages in case these are computed
in the g.region call or function call itself. The value may also provide more explanation to what was actually violated.

Similar to OSGeo#1140 (e0ce155) but for the lat-lon extent cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants