Skip to content

NEW MEMBER TASK: Add prints for reading files #61

@tylerlum

Description

@tylerlum

It is very frustrating when things fail silently or fail without knowing why. Sometimes we just see:
segfault

To resolve this, in key areas, we need to add prints before and after. A common failure is reading files if they are missing or have invalid contents. It would be nice to have something like:
About to read <file>
then right after it is done:
Finished reading <file>.

If we don't have the finished line and it fails later, we may think the reading was the failure, even if it read fine and failed on a future step.

The biggest usage is in:
readCsv() function here: https://github.com/UBCSailbot/global-pathfinding/blob/master/src/grib/gribParse.cpp#L30
https://github.com/UBCSailbot/global-pathfinding/blob/master/src/grib/gribParse.cpp#L340

Should add something like std::cout << "About to read from " << csvfilename << std::endl; at the beginning and end, maybe removing some other prints.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions