Closed pja237 closed 2 years ago
Example, these two log nothing in case of error, causing the app to "silently" end:
https://github.com/CLIP-HPC/goslmailer/blob/5189f278eae40b4a74117a0afe40ee20fb9520de/internal/slurmjob/sacct.go#L230 https://github.com/CLIP-HPC/goslmailer/blob/5189f278eae40b4a74117a0afe40ee20fb9520de/internal/slurmjob/sacct.go#L240
while at this, perhaps it would be better to change prototyping of the top calling method to return error back to main. Make the whole chain of calls below propagate err all the way back to main where it's handled (or log.Print + return err)
https://github.com/CLIP-HPC/goslmailer/blob/5189f278eae40b4a74117a0afe40ee20fb9520de/internal/slurmjob/getjobcontext.go#L125
Example, these two log nothing in case of error, causing the app to "silently" end:
https://github.com/CLIP-HPC/goslmailer/blob/5189f278eae40b4a74117a0afe40ee20fb9520de/internal/slurmjob/sacct.go#L230 https://github.com/CLIP-HPC/goslmailer/blob/5189f278eae40b4a74117a0afe40ee20fb9520de/internal/slurmjob/sacct.go#L240
while at this, perhaps it would be better to change prototyping of the top calling method to return error back to main. Make the whole chain of calls below propagate err all the way back to main where it's handled (or log.Print + return err)
https://github.com/CLIP-HPC/goslmailer/blob/5189f278eae40b4a74117a0afe40ee20fb9520de/internal/slurmjob/getjobcontext.go#L125