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

14
LINES

< > BotCompany Repo | #1002838 // warn function (print warning unless warn_on is set to false)

JavaX fragment (include)

static boolean warn_on = true;
static new ThreadLocal<LS> warn_warnings;

static void warn(S s) {
  if (warn_on)
    print("Warning: " + s);
}

static void warn(S s, L<S> warnings) {
  warn(s);
  if (warnings != null)
    warnings.add(s);
  addToCollection(warn_warnings!, s);
}

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: #1002838
Snippet name: warn function (print warning unless warn_on is set to false)
Eternal ID of this version: #1002838/2
Text MD5: 04b01080338afabe902c5488d2a3226f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-19 12:54:54
Source code size: 291 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 691 / 879
Version history: 1 change(s)
Referenced in: [show references]