Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 658395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:55:44+00:00 2026-05-13T22:55:44+00:00

Lots of resources say to let the errors bubble up from the lower layers,

  • 0

Lots of resources say to let the errors “bubble up” from the lower layers, but I am not sure how to achieve that in my application. Do I need to create a separate utility class for validation or other errors and listen for it at each layer?

For example, if user enters a email address and only unique email addresses are allowed, I assume that I would check for this in the business layer. When I invoke the business logic from UI, do I just include output parameters in my business classes for errors / error msgs. Should I treat handled exceptions the same as business rule exceptions?

Here is a BLL code example:

public class user()
{
    public void Save(UserObject myUser, out bool result, out string resultMsg )
    {
    }

    OR

    string saveResultMsg;

    public bool Save(UserObject myUser)
    {
        saveResultMsg = "bad data whatever";
        return false;    

    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:55:45+00:00Added an answer on May 13, 2026 at 10:55 pm

    This really depends on what you are looking to do, ideally an exception should be used for exceptional circumstances and not to control the process flow.

    I’m a fan of an internal validation process and having a Boolean “Save” method. If false, you can check a “Validation Exceptions” property to see what the rules were that were violated for the entry to not save.

    You could also use exceptions if needed, just be sure to use an appropriate exception type and NOT the base Exception class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having lots of images as frames in my resources/drawable folder (let say
Android comes with lots of system resources ( android.R ) that can be used
Lots of times when I use an application that needs perforce access (Visual Studio,
I have written a Ruby application which parses lots of data from sources in
Let's say I show some profiles randomly via cURL from page Facebook or other
I read lots of .Net resources telling me that I should be using a
Lots of Installer questions, but I can't find the answer to what I want.
Lots of tutorials around the net but none of them can explain me this:
Lots of information on NSDates about the place, but I haven't found a clear
Seeing lots of SOAP/RDS stuff, but just want to dump some MySQL data and/or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.