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

Issue with Panic Handling in MCAT-RAS Library #45

Open
Akopti8 opened this issue Jun 27, 2023 · 0 comments
Open

Issue with Panic Handling in MCAT-RAS Library #45

Akopti8 opened this issue Jun 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Akopti8
Copy link
Collaborator

Akopti8 commented Jun 27, 2023

I encountered an issue while using the MCAT-RAS library, specifically related to panic handling. When intentionally providing an incorrect string for the Coordinate Reference System (CRS), a panic occurs and it is not being gracefully handled by the library's panic handlers.
The function I was using was GetGeospatialData and when I passed "2284" into sourceCRS string it caused a panic and crashed the server was working on. Though we realized that the correct implementation was to add the following sting:

const wkt2284 = PROJCS["NAD83 / Virginia South (ftUS)",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2284"],AXIS["X",EAST],AXIS["Y",NORTH]]
`

A panic still shouldn't have occurred and should have been handled by a defer and recover in Go.

@Akopti8 Akopti8 added the bug Something isn't working label Jun 27, 2023
@Akopti8 Akopti8 assigned ar-siddiqui and unassigned ar-siddiqui Jun 27, 2023
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