I'm currently using such blocks of code in my project

```
     public ActionStatus GetStuff(out output)
     {
        try
        {
            if(!validation)
              return ActionStatus.DataInvalid;
            //do possible error stuff here
            output = data;
            return ActionStatus.Successful;
        }
        catch
        {
            output = null;
            return ActionStatus.Failed;
        }
     }

```

I use this, as the ActionStatus enum is enough for the program to continue (these things are at most times reading data from Cache or Database), as the enum provides enough info to provide a message to the user. Those methods will be having a PostSharp-Weaver attribute, to log the message for later debug use.

In my opinion, this is an OK-ish way of handling such non-critical exceptions, as the enum is enough to continue; on the other hand, I always have the saying "don't control your program flow with exceptions", but I interpret that as using

```
if(ex == fooException)
  doThis();
else if (ex == barException)
  doThat();

```

What is your opinion on that?

**UPDATE:** Off the two answers I can see, that there is need for extra clarification, specificly about the PostSharp-weaver.

PostSharp is an Aspect Orientated Programming (AOP) framework, it basicly allows you to create classes, that overwrite specific methods, like OnEnter, OnExit, OnException, etc.
This allows you to keep specific (e.g. logging) code at a minimum, you just have to put an
attribute to the method or class you want to modify at compiletime. By that, I won't be losing any Exception informations, as the callstack and everything else will still be the same.

**UPDATE 2:** missed an assignment, out parameters have to be assigned.