private override

12Apr/100

The file exists

Maybe I should title this post ‘How to write a better error message’ instead.

I just went on a wild goose chase trying to find the solution to an error I kept seeing in SQL Server Management Studio every time I tried to run a query or open a table for editing (or anything else that would end up executing a SQL query).  The error message?

The file exists

Not exactly useful.

It turns out my temp directory was ‘full’.  The message sort of makes sense, now that I know what the problem was, but it isn’t really possible to draw the correct conclusion from that error message.

So two takeaways (for me):

  1. Craft error messages carefully.  The whole reason for showing/logging error messages in the first place is to create some kind of traceability to a problem.  The information contained in an error message should lead the user to a better understanding of the problem and possibly an indication of if they might be able to fix it.
  2. The file exists means clear your temp directory first, before chasing that goose.
Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.