Re: Repositories, package dependencies, and domain-flavoured exceptions



H. S. Lahman wrote:
Responding to Yip...
....
At yet another level, throwing an exception in either case is a bad practice if the Account ID is supplied interactively. One is then using the exception mechanism to validate user typos. That is a very expensive and fragile way to handle errors that are normally expected in the environment. One should build the application to handle such errors within the normal flow of control and use exceptions to deal with errors that are completely unanticipated (i.e., the software has gotten into an unstable state).
....

This is a good point. The criteria used to initiate the find is a user-entered business identifier, an account number, not an entity id so really shouldn't be throwing an exception if nothing is found. Following the Hibernate-style, this is a find (with a simple query) not a load (by a primary key) and it is therefore not exceptional that no results may be found.

Of course, also dealing with legacy databases so there are other issues...
.



Relevant Pages

  • Re: Authorization Problem
    ... You should need full control ACL for the ASPNET account or whaever account ... An unhandled exception occurred during compilation using the ... > options, CodeCompileUnit[] ea) +272 ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Sql Reporting Serviced - > ASP.NET ACCESS DENIED!
    ... The account you are logging in to when on the server doesn't have the ... do you have <Impersonate> set to True? ... > Exception Details: System.UnauthorizedAccessException: Access to the path ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Security Exception Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
    ... by default the asp.net system account does not have network access, ... I am struggling with a website on a W2K3 server which has the actual ... Exception Details: System.Security.SecurityException: Request for the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET 2.0 with ADAM - problem
    ... > under which account does your web app run - does this account have access ... An unhandled exception has occurred. ... bindingFlags, Binder binder, Object target, ObjectprovidedArgs, ... at _Default.Page_Load(Object sender, EventArgs e) ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: No rights to report server bin folder
    ... Run filemon from www.sysinternals.com and determine which account is being ... "Bob" wrote in message ... :>: current web request. ... :>: Exception Details: System.UnauthorizedAccessException: Access to the ...
    (microsoft.public.inetserver.iis.security)