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

4
LINES

< > BotCompany Repo | #1019897 // returnOrThrow_either - return if eitherA, throw if eitherB

JavaX fragment (include)

1  
static <A> A returnOrThrow_either(Either<A, Throwable> e) {
2  
  if (isEitherB(e)) throw rethrow(e.b());
3  
  ret eitherAOpt(e);
4  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019897
Snippet name: returnOrThrow_either - return if eitherA, throw if eitherB
Eternal ID of this version: #1019897/3
Text MD5: eef06df5ef9b883559e5cf08cfd86d18
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-30 20:30:32
Source code size: 127 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 284 / 318
Version history: 2 change(s)
Referenced in: [show references]