All Questions
Tagged with error-handling object-oriented
26 questions
1
vote
3
answers
1k
views
Math calculation JavaScript. Am I using Objects correctly? Can I use methods / functions to shorten my code further? Also error logging?
Context- CRM system, front-end form.
Requirement- Within a form users have to give a rating to a section based on user inputs, each rating has different weighting. The rating is stored in an option ...
1
vote
1
answer
63
views
Android APP user registration page implementation
This is a follow-up question for Android APP User class implementation. I am attempting to build a user registering system and this post shows the user registration page implementation.
The ...
1
vote
1
answer
77
views
Android APP Password Strength Assessment class implementation
This is a follow-up question for Android APP User class implementation. I am attempting to create a password strength assessment class which is named ...
5
votes
2
answers
9k
views
Should i throw exceptions in the service layer or repository, and catch it on the controller? [closed]
I read some answers here on stack exchange, but none really "hits the nail on the head" about where to throw exceptions, where I shouldn't and where to catch them.
the idea that an exception ...
6
votes
1
answer
1k
views
c# Factory Pattern Generic Exception Handler using dot net core
My task was to create exception handler on some system that has multiple types of database and big business behavior.
At first, I had done a switch/case that handled the exceptions by type using the <...
4
votes
3
answers
211
views
PHP display Error Wanings Yellow @ bottom of Page with PHP_EOL
I initially started searching for a PHP script which would output PHP errors, to the JavaScript console. As the Default behaviour is just to spit them out anywhere and displace everything else.
...
11
votes
4
answers
7k
views
Skipping over failed imports until they are needed (if ever)
We have a program with many dependencies. Because the user may not want to use all of them, the program should skip over failed imports and only raise an error if absolutely necessary. e.g. if the ...
3
votes
1
answer
554
views
PHP Error handler class
I set up an error handler class to handle all server errors, I know there are already quite a few out there, but I like creating my own for better learning and understanding of how things work.
I am ...
0
votes
2
answers
194
views
Custom Error Classes in OOP
I have a class which parses a .csv file and converts it into successful rows and errors. Currently I have 12 different kind of errors (mail is not valid, missing column x, row is duplicate etc.).
...
6
votes
2
answers
2k
views
Simulation of a banking system with an Account class in C++
I have been learning C++ and recently I have started practicing classes. I made this simulation of a banking system with an Account class. I would like to hear feedback on my code, what is good - what ...
2
votes
1
answer
392
views
Implementation of OpenGL context
context.h:
...
1
vote
1
answer
1k
views
Push Entity Framework exceptions to business layer
I am trying to write an exception handler/parser, which I want to return from DAL to the business layer. I am writing below class because I don't want my business layer to know if I am using EF under ...
5
votes
2
answers
745
views
Send records and retry them if acknowledgement is not received
I am working on a project where I need to consume lot of records and then I am sending these records to some other system which uses zeromq.
Here is the flow:
Store all the incoming records in a CHM ...
7
votes
1
answer
239
views
Class: 2D Variant Array
Note: Yes. It's big. I'm not expecting commensurately
long/detailed answers (though if anyone wants to write one, you'll definitely be receiving a substantial bounty). This class is going to be used ...
2
votes
2
answers
2k
views
Program to edit an address book stored as a JSON file
I'm trying my hand at an address book and the goal is for it to have a bit more of error prevention. For instance, for the key "phone" to have 10 digits, and not allow alpha characters at section 4. I ...
1
vote
1
answer
129
views
Python exception handling class - Getting as much details printed
I'm trying to write a Exception Handling class in Python so that I can re-use. If you have any ideas on how I can improve this to output more detailed information I would appreciate it:
...
3
votes
1
answer
524
views
Uploading multiple files using a class
Below I have implemented a class that will validate and upload files based on the specified rules.
...
2
votes
2
answers
81
views
Instantiating different kinds of error records for a database operation
I've written code to be called from Powershell like so:
Rename-DatabaseUser -Name 'someuser' -NewName 'somenewuser'
I'm wondering if there's another way I can ...
6
votes
1
answer
125
views
Avoiding code repetition while handling exceptions
For my application, I need to use two slightly different algorithms for persisting an entity:
...
2
votes
1
answer
2k
views
Program simulating dictionary using file handling - part 2
This is the new version of the dictionary program which I uploaded for reviewing here.
I would be grateful if the program could be reviewed for all the points mentioned in the above link.
...
7
votes
1
answer
208
views
LiveDate version 2
LiveDate has the ability to display the current date either by asynchronously fetching the time from a server or by just using the client system date. It's only as ...
12
votes
1
answer
5k
views
Extending the VBA Extensibility Library
The Microsoft Visual Basic for Applications Extensibility library let's us meta-program VBA, but the way it handles (or rather, doesn't handle) getting to the actual subs and functions is clunky at ...
4
votes
1
answer
284
views
Throw exception in favor of an error?
I've been reviewing my previous projects for the last few days. I've found that I never return an error from any of my methods. I always throw exceptions. I googled about exceptions vs errors and I ...
4
votes
1
answer
10k
views
Throw an exception to control the flow of code execution
There is a recommendation not to use an Exception to control the flow of execution. This gives me a reason for doubt when I do something like this:
...
6
votes
3
answers
4k
views
OOP methods/functions that can return a value or an exception
I'm currently working through a series of bugs in an application. Our application is written in C#/ASP.NET (on the server) and HTML/CSS/JavaScript (on the client). We are using ELMAH to log any ...
7
votes
1
answer
458
views
Class representing a text file
I'm trying to write a simple class to represent a text file - which one would think should be quite easy. I don't intend to add all bells and whistles to fully represent a text file just enough to be ...