[PROJ] Catching error from proj_create_operations

Nyall Dawson nyall.dawson at gmail.com
Thu May 30 20:12:46 PDT 2019


Hi list,

What's the correct way to get errors as a result of a
proj_create_operations call? When trying to create a (deliberately)
bad operation, I can see on the console that proj throws a nice
descriptive warning:

"internal_proj_create_operations: Source and target ellipsoid do not
belong to the same celestial body"

And, as expected, the function returns a nullptr. I'm trying to
retrieve this descriptive error string for display to users, but can't
work out how to do this. I can't use proj_errno, since I don't have a
object to retrieve from. And if I try to retrieve from the context
using proj_context_errno, I just get a -61 "generic error of unknown
origin" message.

Any suggestions?

Nyall


More information about the PROJ mailing list