Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [error-messages]

The tag has no usage guidance.

1
vote
2answers
72 views

Is there a guideline on writing message that are shown to users of an app?

Is there any guideline on writing message which are shown to the user of an app using toast? For example, if an error occurred, should the app display Failed writing to the file or Failed ...
3
votes
1answer
108 views

Where should the display messages on the UI be stored?

I am a backend developer and was having this argument yesterday with a frontend dev in my team about whether or not should I let him fetch the displayable text message about the result of an operation ...
5
votes
2answers
87 views

Is there some sort of standardisation for error reporting? [closed]

I'm looking for some sort of standardisation, in a similar vein as POSIX for compatibility and familiarity between different commandline-interfaces, but for error reporting. Notably, I'm looking for: ...
-2
votes
1answer
211 views

good practice: error message and error code

I'm currently testing a web service and I have noticed that there is only one error code ever return: 400. However, the error message return isn't always the same. Here are some examples of the ...
1
vote
2answers
130 views

Dealing with minor, non-critical errors (warnings) in libraries

I'm writing a small library to open an xml. If reading top level xml element fails, the library throws an exception. However, if reading one of the minor, lower level xml elemetns fail, I currently ...
3
votes
2answers
93 views

Custom messages to UI from DAL?

I have an Asp.net MVC application and sometimes I want to give a descriptive error message to the user, but the condition of it is discovered at the Data Access Layer (DAL). So for example, I have a ...
65
votes
9answers
12k views

Novice programmer(s) frustrated by lack of a glossary of compiler errors

A friend of my family asked me for a bit of help as he learns to program (in the C language). As we were talking, he expressed frustration about having a hard time understanding the error messages his ...
1
vote
1answer
71 views

How to implement format-complying logging system?

We have a system that generates lots of logs and we have to somehow maintain logging workflow in a project. The 'strict' (let's assume it's strict) requirement is that there should be a document ...
39
votes
6answers
5k views

Making code findable by using globally unique message IDs

A common pattern for locating a bug follows this script: Observe weirdness, for example, no output or a hanging program. Locate relevant message in log or program output, for example, "Could not find ...
10
votes
4answers
357 views

Include a link to relevant documentation in error message?

We create a commercial library and code examples that are being used by external developers. We have (closed, available to registered users) documentation that extensively explains how to use the ...
1
vote
1answer
98 views

Is it correct to only test for database connectivity failure on the login page/form?

There is a database-based application at work with an authorization system. If a user is not logged in, the only system accessible to them is the authorization system where they must provide a valid ...
3
votes
1answer
136 views

Are there any standards for labelling stdout/stderr messages?

I'm making a console application, and over time I have been developing my own tools and practices for outputting text; a process that keeps evolving. For example, these days I have 4 main types of ...
3
votes
2answers
582 views

Should failed results be errors or data in RESTFul?

Assuming I have a RESTful service and it always responds in this format: { "error": { "code": ..., "message": ... } } or { "data": ... } and there is a method like ...
2
votes
2answers
3k views

validation error responses in REST API

I'm designing a RESTful API and wondering what's the best format for validation error messages. For example, my account creation endpoint accepts a JSON object: user: { first_name: string, ...
0
votes
3answers
113 views

Preventing information leakage while returning an error message

Say my website contains 2 functions: Allow a user to change their own password Allow an administrator to change a user's password (the user must change again before they login) Now let's say that ...
5
votes
3answers
121 views

Recommendations for adding exceptions messages to code [closed]

The "problem" that I am having right now its quite simple, I am creating a code with A LOT of validations, in case one of those fails it is supposed to throw an exception. In order to make the ...
1
vote
2answers
192 views

Why is there “Unknown error” in real life? [duplicate]

As a programmer, I always try my best to explain what happened in the code when I have to show an error message, for example: try { int a = b / 0; } catch (NumberFormatException ex) { System....
2
votes
2answers
1k views

How should I provide detailed information about an error, if not through HTTP status codes?

This question comes from here. I believe it deserves to be on its own instead of being lost in a long question with multiple points. I'm building an API and find myself limited by HTTP error codes. ...
32
votes
3answers
6k views

Is address 0000000C a special address?

When programming sometimes things break. You made a mistake and your program tries to read from a wrong address. One thing that stands out to me that often those exceptions are like : Access ...
0
votes
1answer
9k views

Facing MemoryError in Python

I wrote a program to find prime factors of a number. When I give a large number(600851475143) as input, MemoryError pops up. Below is the code: def fact(a): factors = [] for i in range(1,a+1)...
4
votes
1answer
1k views

Request content-type of HTTP errors

HTTP allows for multiple representations of a resource. The Accept header allows the client to choose the representation of the resource. GET /foo/bar HTTP/1.1 Accept: application/pdf GET /foo/bar ...
1
vote
2answers
2k views

Changing message without redeploying / restarting application

Question: In java application, How to change error message or simple alert text without redeploying / restarting application Closest answers I could think up (1) is to have a new error messages in ...
4
votes
3answers
1k views

Handling and managing error codes [closed]

I'm looking for examples of creating, handling and managing error numbers/codes. To understand what I'm takling about, let's take example scenario: (EU - end user, IT - it helpdesk) EU: - (calls IT) ...
4
votes
2answers
400 views

How would you approach errors notification?

Recently we had a discussion with my colleagues caused by my intentional attempt to generate user friendly message about occurred error (business logic) at the server side. They insisted on putting ...
38
votes
6answers
2k views

How much information about an error should be shown to the user?

Applications can always throw errors. If such an error occurs, the user should be notified, because what he asked the application to do has not succeeded. However, how much information should the ...
1
vote
8answers
666 views

Using error numbers which only work on 64 bit servers: a bad idea?

In an attempt to solve one problem I encountered another. I would like to have an easy and memorable way of creating unique error numbers, across projects and across developers. The scheme I came up ...
11
votes
3answers
20k views

Python - assert vs if & return

I am writing a script that does something to a text file (what it does is irrelevant for my question though). So before I do something to the file I want to check if the file exists. I can do this, no ...
1
vote
1answer
245 views

Grammar: start: (a b)? a c; Input: a d. Which error correct at position 2? 1. expected “b”, “c”. OR expected “c”

I am writing a parser (a parser generator for PEGs) and am trying to figure out how to report errors. Grammar: rule: (a b)? a c ; Input: a d Question: Which error message correct at position 2 ...
7
votes
2answers
1k views

What layer to introduce human readable error messages?

One of the things that I have never been happy with on any project I have worked on over the years and have really not been able to resolve myself is exactly at what tier in an application should ...
3
votes
1answer
165 views

How do I output an error when I'm determining how to output an error?

I've written an API which can be configured to signal errors in different ways (return values, debugging messages, or exceptions). I've got a check in place when the API is first initialized to see ...
1
vote
1answer
67 views

Messages from UI or from subs?

I am designing a small application that is really justa gui for a command line using vb.net. Question 1. Should messages(msgbox) to the user come from the UI or should messages come from subs and ...
2
votes
3answers
256 views

Am I handling my exceptions in a sensible manner?

I'm still restructuring the code I have been given to update on my current work project, and I've come to the point where I'm looking at how the code handles an 'exceptional' input, that doesn't ...
6
votes
1answer
2k views

What is the nicest (user-friendliest) way to tell a user about “Access Denied” error?

Our software implements a layer of role-based security to secure data access, in the form of access control lists. Whenever a user tries to do something that isn't allowed, the software layer will ...
3
votes
3answers
176 views

Choosing a proper wording for referring compiler errors

Consider someone is writing a message (or a question at StackOverflow). The context is following: In my code, I have the following line: int foo = Bar(); However, the compiler returns an ...
3
votes
1answer
2k views

Dealing with API and error messages

We are in the process of constructing an API (using WCF). So far I noticed 2 ways in which methods could go wrong due to problems with the parameters sent. wrong format, for example we have a string ...
2
votes
1answer
10k views

web server response code 500

I realize that this may spur a religious discussion, but I discussed this with friends and get great, but conflicting answers and the actual documentation is of little help. What does the 500 series ...
4
votes
1answer
748 views

Using default parameters for 404 error (PHP with mvc design)?

I have a custom made Framework (written in PHP). It all works very good, but i have some doubts about a certain thing. Right now when a user call this url for example: http://host.com/user/edit/12 ...
29
votes
20answers
3k views

How do you tackle really bizarre errors that keep you puzzled for more than 10 hours? [closed]

You know them, those errors that make NO sense. Where it seems like a gremlin just jumped deep inside your chips and messed up something. Do you take a walk, write stuff, call an uncle?
7
votes
4answers
5k views

How important are PHP notices really?

I recently turned all possible error-messages on with error_reporting(-1);, on my PHP project. Of course, right away I got alot of messages. For example: Notice: Undefined variable: foo in /.../...
12
votes
4answers
7k views

How do you assign error codes?

How, when developing a medium sized project, do you identify, create and maintain error codes? I for the life of me can't think of a simple and clean method of doing so. Some of my ideas convert ...
7
votes
5answers
990 views

What is the proper response to lousy error message?

I've just come across (for the 47 millionth time) some code that looks like this: except IOError, e: print "Problems reading file: %s." % filename sys.exit( 1 ) My first reaction is very ...
4
votes
3answers
921 views

Crash and error report to developer [from user perspective]

I have some questions regarding whether to crash or report errors to the user. We are developing a web site and mobile clients in which we allow our users to report any bugs and crashes through e-mail....
28
votes
3answers
9k views

Why are C++ template error messages so horrific?

C++ templates are notorious for generating long, unreadable error messages. I have a general idea of why template error messages in C++ are so bad. Essentially, the problem is that the error isn't ...
18
votes
8answers
2k views

Do you read C or C++ compile errors after the first one?

I never understood why C and C++ compilers try to recover from errors and continue parsing. Almost always, the first error generates a stream of bogus errors that will disappear as soon as the first ...
2
votes
1answer
771 views

Translating error messages from an external API?

If I am localizing a piece of software that uses an external API, how should I handle error messages that originate in this API? I do not control the API, I only consume it. The error responses are ...
7
votes
4answers
1k views

Multi-lingual error messages and error numbers

So we're looking at the possibility of porting our software to support multiple languages and one of the areas we're going to have to deal with is error messages and other notifications. These ...
29
votes
12answers
2k views

What are developer's problems with helpful error messages? [closed]

It continue to astounds me that, in this day and age, products that have years of use under their belt, built by teams of professionals, still to this day - fail to provide helpful error messages to ...
7
votes
2answers
145 views

Test descriptions/name, say what the test is? or what it means when it fails? [closed]

The API docs for Test::More::ok is ok($got eq $expected, $test_name); right now in one of my apps I have $test_name print what the test is testing. So for example in one of my tests I have set this ...
18
votes
9answers
941 views

Under what circumstances should error messages be presented to the user? [duplicate]

Should error messages ever be presented to an end user and if so what rules or advice should you have about what should be in them?
26
votes
9answers
12k views

Why do many PHP Devs hate using isset() and/or any of PHP's similarly defensive functions like empty()?

Over on stackoverflow, I see this issue crop up all the time: E_NOTICE ?== E_DEBUG, avoiding isset() and @ with more sophisticated error_handler How to set PHP not to check undefind index for $...