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)

1  
svoid callFAndPutInResultOrErrorMap(Map resultMap, Map errorMap, O key, O f, O... args) {
2  
  try {
3  
    resultMap.put(key, callF(f, args));
4  
  } catch e {
5  
    if (errorMap != null) errorMap.put(key, persistableThrowable(e));
6  
  }
7  
}

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: 226 / 256
Referenced in: [show references]