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

Eliminate GMT_exit calls from gmt_map.c #3401

Merged
merged 9 commits into from
May 28, 2020
Merged

Eliminate GMT_exit calls from gmt_map.c #3401

merged 9 commits into from
May 28, 2020

Conversation

PaulWessel
Copy link
Member

Description of proposed changes

We had 20 or so calls to exit in gmt_map.c, mostly when some map projection parameters was not in a valid range. Many of these places were in void functions so no way to pass an error code up. I have changed this to allow the error code to be returned so that the appropriate higher level function called in the module can call Return (error) and die a normal death. Because many of these functions (e.g., gmt_init_distaz ) are called in modules this PR affects numerous files. I have slowly eliminated new bugs and fixed things until all tests again pass (for me).
I also had to make a fix in pscoast for -JE since there are times we paint lakes with the ocean color when we cannot do the recursive painting. However, we never considered -B+gfill setting in that scenario. This accected the placement.sh test and tnow the new pscoast_JE4.sh test. I also found a file in cache was still in a test dir, causing failure depending on which file was used.
Please run the test to see if you agree that all is well before you approve. Important that this is checked on WIn and Linux as well as macOS.

@seisman
Copy link
Member

seisman commented May 28, 2020

Important that this is checked on WIn and Linux as well as macOS.

Do you want to temporarily enable the whole tests in this branch?

@PaulWessel
Copy link
Member Author

yes please. This PR got too big unfortunately, as I initially got lots of failed tests and had to expand it... For the next exit round I will go small and frequently...

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new failures on macOS, Linux, and Windows.

@PaulWessel
Copy link
Member Author

Thanks!

@PaulWessel PaulWessel merged commit 5839a0d into master May 28, 2020
@PaulWessel PaulWessel deleted the no-exit-gmt_map branch May 28, 2020 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants