Questions tagged [errors]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
3 answers
620 views

Business logic error handling. Should exceptions really be avoided?

C#'s primary error handling mechanism are exceptions and try pattern. We don't have access to discriminated unions yet like in case of F# and Rust Option<T> and Result<T, E> types. The ...
user avatar
  • 1,401
55 votes
11 answers
11k views

Is there a general solution to the problem of "sudden unexpected bursts of errors" in software?

Let me explain what I mean. I have made a complex, highly polished over years PHP framework/library for my own use. I very aggressively log the smallest notice and immediately deal with it as soon as ...
user avatar
0 votes
2 answers
188 views

Errors that don't make code behave wrong from user's point of view - how would you call them?

var file_extension = 'txt'; if (file_extension === 'txt') alert('plain text'); else if (file_extension === 'md') alert('markdown'); var file_extension = 'txt'; if (file_extension === 'txt') ...
user avatar
  • 195
4 votes
1 answer
229 views

What do you call the interface design error that consists in splitting two public methods that should be called together?

Consider a poorly-designed interface in which there are two functions (say foo() and bar()) that can be called independently, but in order to get some expected behavior (or in order to keep the object ...
user avatar
  • 151
4 votes
2 answers
164 views

API Design: Errors passed between APIs

I work as a developer on a few different APIs that make calls to each other. Let's take two and call them API-USER and API-BUSINESS. A user application makes calls to API-USER, which in turn makes ...
user avatar
  • 273
4 votes
5 answers
222 views

Dealing with unwanted usages of a function

I am writing a function that I would not like to get called given a certain context and am wondering how best to convey that to possible users of the function. Assume, for exemplification, I am ...
user avatar
4 votes
5 answers
452 views

How do you assess the damage in a system that has been using floats or doubles for money?

I've been assigned to a code base responsible for millions of dollars of transactions, per quarter, and has been in use for over a decade. Sifting through the solution, I see doubles used everywhere ...
user avatar
  • 1,339
1 vote
2 answers
225 views

Error Codes with Properties Files or Database

I'm about to implement Error codes for my company API, so, based on rfc7807 I will include a type which is an error type which is basically an error category, and inside those categories we have a ...
user avatar
  • 19
0 votes
1 answer
126 views

How to handle errors that is caused by old data structure?

When a major data structure has been changed in an app, what is the best way to handle such kind of errors in the front-end side so that the app doesn’t break? For example, we have a list of users ...
user avatar
-4 votes
1 answer
279 views

What are chances that computer (program) made a mistake? like not evaluate if(true)

(Probably my question is somehow similar to this, but I'm interested from the point of program engineers.) What are chances and under what circumstances, a computer program could ever made a mistake ...
user avatar
  • 145
1 vote
2 answers
195 views

Error Monitoring On The Apps Which I'm Selling

I'm developing JS and PHP scripts and selling them on various marketplaces. But I need to track/monitor errors on my scripts. Usually, I use Sentry for own web apps, but I'm not sure if it's okay to ...
user avatar
  • 336
168 votes
9 answers
28k views

I changed one method signature and now have over 25,000 errors. What now?

I started a new job recently where I am working on a very large application (15M loc). In my previous job we had a similarly large application but (for better or for worse) we used OSGi, which meant ...
user avatar
  • 1,311
4 votes
0 answers
327 views

Error handling paradigms [closed]

Is there a universally accepted classification of error handling strategies? What is a general term to refer to those strategies, which can be used while searching for books and articles that compare ...
user avatar
  • 149
30 votes
6 answers
8k views

Thousands of errors!

I was assigned to a new project recently. Well, an old project actually, written in classic ASP. Now a new version of the application is being written in the latest ASP.NET, but it's not expected to ...
user avatar
  • 1,600
1 vote
4 answers
248 views

Must a variable contain an instance of a class if it invokes a method?

In the following link, the author states that We have already reasoned that ‘out’ is a static variable belonging to the class System. But now we can see that ‘out’ must be an instance of a class, ...
user avatar
2 votes
2 answers
3k views

Error handling in C++

So, in the recent weeks I delved into C++ programming, and I programmed some things in SDL. Doing so, you always have to deal with a lot of (ugly) C++ code, which looks more like C than C++. One thing ...
user avatar
  • 761
51 votes
5 answers
11k views

Can the "level 256 bug" in the game of Pacman be considered an unhandled segfault?

I am trying to explain segmentation faults to someone, and I was thinking about the level 256 kill-screen in Pacman, and how it's triggered by integer overflow, and how similar the behavior is to the "...
user avatar
3 votes
2 answers
505 views

Methods of "Code Softening" (Opposite of "Hardening") for C & C++ [closed]

Some developers work on code hardening. (protecting against errors, you can build with a stack protector for example). However, if you're trying to redo a strange someone else reports, or find ...
user avatar
-2 votes
1 answer
151 views

Error recovering emails in Delphi (POP3) [closed]

I'm new to programming with Delphi. I have the latest version. I'm trying to display my emails using POP3 but I have a problem. At one point I was wrong and did a loop with POP3.Retrieve() method ...
user avatar
5 votes
4 answers
460 views

Is there a name for an internal incorrect behaviour that does not manifest itself as a bug?

To put this in context, I have the following scenario. I am writing a Common Lisp program that works with strings and lists of characters. In a certain function foo, the value of a variable suff is a ...
user avatar
  • 19.1k
0 votes
2 answers
164 views

can a logic error happen way later than its cause? [closed]

For comparison, for a runtime fatal error, it is often that the cause of the error is way before the error crashes a program. For a logic error, it doesn't crash a program. It happens when the state ...
user avatar
  • 5,271
3 votes
4 answers
223 views

Wrap all external calls with flag to fight against recursion and double-entry?

Producing predictable output for each possible input is the responsibility of each module. For example (in C#): class Logger { public ITextWriter Writer { get; set; } private uint counter; ...
user avatar
  • 328
6 votes
2 answers
8k views

Defining error codes

We are designing an error-handling framework for a cryptographic library written in C. The approach we are taking is that relatively few errors are propagated back to the user since on most occasions ...
user avatar
5 votes
3 answers
1k views

Declaring variables in Python and PHP

The question is how to cope with absence of variable declaration in Python, PHP, and the like. In most languages there is a way to let the compiler know whether I introduce a new variable or refer to ...
user avatar
20 votes
10 answers
3k views

How can my team avoid frequent errors after refactoring?

To give you a little background: I work for a company with roughly twelve Ruby on Rails developers (+/- interns). Remote work is common. Our product is made out of two parts: a rather fat core, and ...
user avatar
  • 311
5 votes
3 answers
3k views

Infinite loop with a singleton - does this type of issue have a name?

I ran into an unusual error while working on my project. To better learn from and remember it, I'd like to know if this type of error has a name or some definition. (The error itself OutOfMemoryError ...
user avatar
  • 20.7k
3 votes
2 answers
94 views

Methodology To Determine Cause Of User Specific Error

We have software that for certain clients fails to download a file. The software is developed in Python and compiled into an Windows Executable. The cause of the error is still unknown but we have ...
user avatar
0 votes
7 answers
548 views

How to avoid errors and not miss anything [duplicate]

I have a problem that is more serious than it might seem. I've been programming for about three years , and I have learned and improved a lot , I read the code easily to others, understand the ...
user avatar
1 vote
4 answers
2k views

How to trace logical errors in algorithms [closed]

I am beginner in algorithms. Last year I participated in Google Code Jam. One of the major issues I faced during the competition was my code was working fine on my test cases, but when I submitted on ...
user avatar
14 votes
2 answers
7k views

What's the difference between robustness and fault-tolerance?

Systems / programs / distributed algorithms / ... are often described with the predicate robust or fault-tolerant. What is the difference? Details: When I google for +robust +"fault-tolerant", I ...
user avatar
  • 1,292
1 vote
1 answer
147 views

How can I handle clock hands using doubles that suffers at most O(log n) corrupt bits at nth frame of display?

I presently have a clock app that calculates from scratch at every iteration. This means O(1) corrupt bits in my doubles and heavy object creation and deletion as well. I am wary of running ...
user avatar
3 votes
1 answer
186 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 ...
user avatar
36 votes
1 answer
3k views

Where does paypal's 92233720368547800 number come from? [closed]

There has been a story in the news about a man whose Paypal account was accidentally credited with $92,233,720,368,547,800. Where does this number come from? What sort of programming bug is likely to ...
user avatar
  • 2,759
7 votes
2 answers
13k views

How to test functions or the code inside $(document).ready() using Jasmine?

I have multiple functions and a lot of code inside $(document).ready(function()). I am using jasmine to test the functions inside the ready function as well as the code inside ready() but when the ...
user avatar
  • 71
2 votes
2 answers
212 views

How to be robust against webservice downtime caused by third parties

I'm using iPage as my cloud based server provider. I haven't had any problems with them yet. They hold the scripts for my RESTful services for the mobile app I'm developing. My problem however is ...
user avatar
3 votes
2 answers
332 views

What happens when using address before it's allocated?

The very simple piece of C++ code below is incorrect, it's easy to see why and tools like Valgrind will tell you. In running several C++ codes containing this kind of error, I noticed that each time, ...
user avatar
  • 381
3 votes
3 answers
183 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 error: line ...
user avatar
2 votes
2 answers
387 views

Android: Not able to experiment on own? [closed]

I have just started learning Android App Development a few days ago, with prior knowledge of C/C++, HTML and CSS. This is the situation I am facing Repeatedly: I am learning from a Video Tutorial ...
user avatar
1 vote
5 answers
354 views

What can be done to decrease the number of live issues with applications?

First off I have seen this post which is slightly similar to my question. : What can you do to decrease the number of deployment bugs of a live website? Let me layout the situation for you. The ...
user avatar
4 votes
1 answer
323 views

Why is nesting or piggybacking errors within errors bad in general?

Why is nesting or piggybacking errors within errors bad in general? To me it seems bad intuitively, but I'm suspicious in that I cannot adequately articulate why it is bad. This may be because it is ...
user avatar
  • 8,567
5 votes
8 answers
4k views

How to avoid typo errors, etc?

For the first time I have been coding for an open-source software where all my work gets reviewed before being commited. I understand reviewing work isn't an easy task, so I don't like to waste ...
user avatar
0 votes
2 answers
226 views

Using a parser to locate faulty code

Lately I've been working a lot in PHP and have run into an abnormally large number of parsing errors. I realize these are my own fault and a result of sloppy initial coding on my part, but it's ...
user avatar
1 vote
6 answers
414 views

Catching an error?

Is catching an error with try ... catch a better practice than catching an error with proper analysis/error check? For instance, removing from an empty list: Does surround with a try catch clause ...
user avatar
3 votes
2 answers
203 views

Common Industry Term For Negative Logging? [closed]

It is one thing to log something that happened in code, a process, or procedure. It is another thing to log something that didn't happen. For example, if your ETL system is supposed to receive a ...
user avatar
16 votes
11 answers
691 views

How to teach your users/customers to send better error descriptions

I often have to deal with customers or users which are reporting errors in applications. Most of the time their content is something useless as ERROR!!! x does not work without much more ...
user avatar
  • 263
2 votes
4 answers
3k views

Silent Crash of WPF/VB.net 2010 based application

I have an application built in WPF and VB.net. It works on several Windows XP computers that I've tested it on, however, my animator's computer doesn't seem to like it. At first, the program would ...
user avatar
37 votes
13 answers
32k views

Worst practices in C++, common mistakes [closed]

After reading this famous rant by Linus Torvalds, I wondered what actually are all the pitfalls for programmers in C++. I'm explicitly not referring to typos or bad program flow as treated in this ...
user avatar
  • 2,097
14 votes
2 answers
3k views

How should compilers report errors and warnings?

I don't plan on writing a compiler in the near future; still, I'm quite interested with compiler technologies, and how this stuff could be made better. Starting with compiled languages, most ...
user avatar
  • 2,496
-3 votes
5 answers
971 views

Uncaught TypeError: Cannot read property 'add' of null [closed]

I am novice developer. While development is going on, we come across different error issues. However for the novice of programming, it is always hard to directly understand them & solve them. I ...
user avatar
18 votes
9 answers
1k 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?
user avatar
  • 22.7k