intel/numatop

Completion of error handling

Closed this issue · 3 comments

Would you like to add more error handling for return values from functions like the following?

yaoj commented

Sure, thanks! I will add more error handling in next version.

From: Markus Elfring [mailto:notifications@github.com]
Sent: Monday, September 07, 2015 3:25 AM
To: 01org/numatop
Subject: [numatop] Completion of error handling (#15)

Would you like to add more error handling for return values from functions like the following?

  • pthread_cond_waithttp://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_wait.html ⇒ perf_handlerhttps://github.com/01org/numatop/blob/3f8ee7ab1c96d70f8e2ecda5e188b7b4eeb051c9/common/perf.c#L174
  • pthread_mutex_lockhttp://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html ⇒ cpu_profiling_smplhttps://github.com/01org/numatop/blob/3f8ee7ab1c96d70f8e2ecda5e188b7b4eeb051c9/common/os/os_perf.c#L193


Reply to this email directly or view it on GitHubhttps://github.com//issues/15.

I suggest to avoid ignorance of return values a bit more.

Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?

How do you think about to improve static source code analysis also for this software? 🤔