Dynamically define remote exception classes