DEV Community

Discussion on: Identifying the dirt in our code - names, functions, and comments

Collapse
 
shaunchong profile image
shaunchong

Thanks!

I misunderstood your original article and thought you meant that we should not be returning error codes in our functions. I think it's ok to return error codes/throw exceptions in our functions but it should be caught (or we should detect the error code before it reaches the user) and display a friendly error message to the user.