Converting between those codes goes against the goal of being able to throw an exception on a shard and get the same exception thrown in mongos.