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

23
LINES

< > BotCompany Repo | #1000689 // processSilent function (hotwire and call for processing)

JavaX fragment (include)

1  
static Object processSilent(String processorID, Object in) {
2  
  return processSilent(processorID, in, "in");
3  
}
4  
5  
static Object processSilent(String processorID, Object in, String outVar) {
6  
  try {
7  
    Class processor = hotwire(processorID);
8  
    return processSilent(processor, in, outVar);
9  
  } catch (Exception e) {
10  
    throw new RuntimeException("Error in #" + parseSnippetID(processorID), e);
11  
  }
12  
}
13  
14  
static Object processSilent(Class processor, Object in) {
15  
  return processSilent(processor, in, "in");
16  
}
17  
18  
static Object processSilent(Class processor, Object in, String outVar) {
19  
  set(processor, "in", in);
20  
  try { set(processor, "silent", true); } catch (Exception e) { e.printStackTrace(); }
21  
  call(processor, "main", new Object[] {new String[0]});
22  
  return get(processor, outVar);
23  
}

Author comment

Began life as a copy of #1000661

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1000689
Snippet name: processSilent function (hotwire and call for processing)
Eternal ID of this version: #1000689/1
Text MD5: 09ecf959bfd61f0cad6e1de540dd2179
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-22 16:53:45
Source code size: 807 bytes / 23 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 606 / 1240
Referenced in: [show references]