Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1023411 // callFAndPutInResultOrErrorMap - put result in one map or exception in other map (with same key)

JavaX fragment (include)

svoid callFAndPutInResultOrErrorMap(Map resultMap, Map errorMap, O key, O f, O... args) {
  try {
    resultMap.put(key, callF(f, args));
  } catch e {
    if (errorMap != null) errorMap.put(key, persistableThrowable(e));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023411
Snippet name: callFAndPutInResultOrErrorMap - put result in one map or exception in other map (with same key)
Eternal ID of this version: #1023411/1
Text MD5: e36a99cfec47544ff9af304254677515
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-06-17 23:53:14
Source code size: 233 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 157 / 189
Referenced in: [show references]