From time to time you want to alter the type of an exception, and after that preserving the first exception as internal exception is the greatest you are able to do. Nevertheless it should be throw new MyCustomException(myMessage, ex); not surprisingly.2 looks kind of overkill. does the git remote incorporate origin make the area branch trackable?