@@ -142,51 +142,51 @@ public void dispatch(BaseCmd cmd, Map<String, String> params) {
142142 // earlier, we'd log the db id as part of the log message, but now since we've pushed
143143 // the id into a IdentityProxy object, we would need to dump that object alongwith the
144144 // message.
145- InvalidParameterValueException ref = (InvalidParameterValueException )t ;
145+ InvalidParameterValueException ref = (InvalidParameterValueException ) t ;
146146 ServerApiException ex = new ServerApiException (BaseCmd .PARAM_ERROR , t .getMessage ());
147147 // copy over the IdentityProxy information as well and throw the serverapiexception.
148148 IdentityProxy id = ref .getProxyObject ();
149149 if (id != null ) {
150- ex .setProxyObject (id .getTableName (), id .getValue ());
151- s_logger .info (t .getMessage () + " uuid : " + id .getValue ());
150+ ex .setProxyObject (id .getTableName (), id .getidFieldName (), id . getValue ());
151+ s_logger .info (t .getMessage () + " db_id : " + id .getValue ());
152152 } else {
153153 s_logger .info (t .getMessage ());
154- }
154+ }
155155 throw ex ;
156- } else if (t instanceof IllegalArgumentException ) {
156+ } else if (t instanceof IllegalArgumentException ) {
157157 throw new ServerApiException (BaseCmd .PARAM_ERROR , t .getMessage ());
158- } else if (t instanceof PermissionDeniedException ) {
158+ } else if (t instanceof PermissionDeniedException ) {
159159 PermissionDeniedException ref = (PermissionDeniedException )t ;
160160 ServerApiException ex = new ServerApiException (BaseCmd .ACCOUNT_ERROR , t .getMessage ());
161161 // copy over the IdentityProxy information as well and throw the serverapiexception.
162162 IdentityProxy id = ref .getProxyObject ();
163163 if (id != null ) {
164- ex .setProxyObject (id .getTableName (), id .getValue ());
164+ ex .setProxyObject (id .getTableName (), id .getidFieldName (), id . getValue ());
165165 s_logger .info ("PermissionDenied: " + t .getMessage () + "uuid: " + id .getValue ());
166166 } else {
167167 s_logger .info ("PermissionDenied: " + t .getMessage ());
168168 }
169169 throw ex ;
170- } else if (t instanceof AccountLimitException ) {
170+ } else if (t instanceof AccountLimitException ) {
171171 AccountLimitException ref = (AccountLimitException )t ;
172172 ServerApiException ex = new ServerApiException (BaseCmd .ACCOUNT_RESOURCE_LIMIT_ERROR , t .getMessage ());
173173 // copy over the IdentityProxy information as well and throw the serverapiexception.
174174 IdentityProxy id = ref .getProxyObject ();
175175 if (id != null ) {
176- ex .setProxyObject (id .getTableName (), id .getValue ());
177- s_logger .info (t .getMessage () + "uuid : " + id .getValue ());
176+ ex .setProxyObject (id .getTableName (), id .getidFieldName (), id . getValue ());
177+ s_logger .info (t .getMessage () + "db_id : " + id .getValue ());
178178 } else {
179179 s_logger .info (t .getMessage ());
180180 }
181181 throw ex ;
182- } else if (t instanceof InsufficientCapacityException ) {
182+ } else if (t instanceof InsufficientCapacityException ) {
183183 InsufficientCapacityException ref = (InsufficientCapacityException )t ;
184184 ServerApiException ex = new ServerApiException (BaseCmd .INSUFFICIENT_CAPACITY_ERROR , t .getMessage ());
185185 // copy over the IdentityProxy information as well and throw the serverapiexception.
186186 IdentityProxy id = ref .getIdProxy ();
187187 if (id != null ) {
188- ex .setProxyObject (id .getTableName (), id .getValue ());
189- s_logger .info (t .getMessage () + "uuid : " + id .getValue ());
188+ ex .setProxyObject (id .getTableName (), id .getidFieldName (), id . getValue ());
189+ s_logger .info (t .getMessage () + "db_id : " + id .getValue ());
190190 } else {
191191 s_logger .info (t .getMessage ());
192192 }
@@ -197,8 +197,8 @@ public void dispatch(BaseCmd cmd, Map<String, String> params) {
197197 // copy over the IdentityProxy information as well and throw the serverapiexception.
198198 IdentityProxy id = ref .getIdProxy ();
199199 if (id != null ) {
200- ex .setProxyObject (id .getTableName (), id .getValue ());
201- s_logger .warn ("Exception: " + t .getMessage () + "uuid : " + ref .getIdProxy ().getValue ());
200+ ex .setProxyObject (id .getTableName (), id .getidFieldName (), id . getValue ());
201+ s_logger .warn ("Exception: " + t .getMessage () + "db_id : " + ref .getIdProxy ().getValue ());
202202 } else {
203203 s_logger .warn ("Exception: " , t );
204204 }
@@ -209,8 +209,8 @@ public void dispatch(BaseCmd cmd, Map<String, String> params) {
209209 // copy over the IdentityProxy information as well and throw the serverapiexception.
210210 IdentityProxy id = ref .getIdProxy ();
211211 if (id != null ) {
212- ex .setProxyObject (id .getTableName (), id .getValue ());
213- s_logger .warn ("Exception: " + t .getMessage () + "uuid : " + ref .getIdProxy ().getValue ());
212+ ex .setProxyObject (id .getTableName (), id .getidFieldName (), id . getValue ());
213+ s_logger .warn ("Exception: " + t .getMessage () + "db_id : " + ref .getIdProxy ().getValue ());
214214 } else {
215215 s_logger .warn ("Exception: " , t );
216216 }
0 commit comments