Issue/12444 namespace exceptions

Fix #12444 

@bantu @DeepDiver1975 
Is there a risk that apps might listen to such exception ? It does seem to be in the private namespace so shouldn't be, so it's probably correct to not provide a deprecated exception in the global namespace.