There is no convenient way to check whether a transaction is a distributed transaction. The information is available in sys.dm_tran_session_transactions and some more DMV, but they require VIEW SERVER STATE, and thus it is not easy to check them from code that is to be run by unprivleged users.
A special property of a distributed transaction is that can be aborted, but not really rolled back. This happens if the server that did not start the transaction rolls back. When you
are in this state, you are very limited to what you can do, too limited (covered in another
The reason you would do this is that you may want to have a different error-handling paradigm when the you are the lower part of a distributed transaction.