I have written a function that throws CustomException1, CustomException2. 

```
void myfunction() throws CustomException1, CustomException2
{
  .. At some point in time, i am return from this function.
  if ( some condition fails)  return ;

}

```

**Problem:**

But the problem is that it return from the function, but at the same time
this throws the CustomException1. 

How can i make sure to not throw CustomException1 while returning the function. 

The interesting part is if reorder the Exceptions names like

```
  void myfunction() throws CustomException2, CustomException1,

```

then the while i return from the function, CustomException2 is thrown.