Bug #793

GMT_Call_Module don't return nonzero in case of error in mapproject module

Added by Michael almost 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:2015-10-18
Priority:LowDue date:
Assignee:-% Done:

100%

Category:-
Target version:Candidate for next minor release
Affected version:5.2-svn Platform:

Description

Test case:
#include <gmt.h>

int main() {
void* gmtapi;
struct GMT_OPTION* opt;
int ret;

gmtapi=GMT_Create_Session("test",2,GMT_SESSION_NOEXIT,0);
if(0==gmtapi) return 1;
opt=GMT_Make_Option(gmtapi,'W',"");
opt=GMT_Append_Option(gmtapi,GMT_Make_Option(gmtapi,'J',"M10c"),opt);
opt=GMT_Append_Option(gmtapi,GMT_Make_Option(gmtapi,'R',"130/150/40/60r"),opt);
ret=GMT_Call_Module(gmtapi,"mapproject",GMT_MODULE_OPT,opt);
printf("%i\n",ret);
GMT_Destroy_Session(gmtapi);
return ret;
}

Output is:
mapproject: Internal Error = GMT_MAP_BAD_LAT_MIN
mapproject (GMT_mapproject): North is outside -90 to +90 degree range
0 0
0

The program itself returns correct error code:
gmt mapproject -JM10c -R130/150/40/60r -W; echo $?
mapproject: Internal Error = GMT_MAP_BAD_LAT_MIN
mapproject (GMT_mapproject): North is outside -90 to +90 degree range
1

r15025

Associated revisions

Revision 15027
Added by Paul almost 2 years ago

Address issue #793

History

#1 Updated by Paul almost 2 years ago

  • Status changed from New to Resolved
  • Target version set to Candidate for next minor release
  • % Done changed from 0 to 100

Thanks, should be corrected in r15027.

#2 Updated by Michael almost 2 years ago

Yes, can be closed

#3 Updated by Joaquim almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF