How would you see this being useful?
If you succesfully opened the database in Exclusive mode then you retain exclusive mode.
If you succesfully opened the database in Shared mode, you will not get into Exclusive mode until try to do something that requires it, so you can't test for it before you attempt that action (because you are still in Shared mode).