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

11
LINES

< > BotCompany Repo | #1036411 // Test addGlobalLastErrorsBufferToDefaultPCallPolicy (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Transpiled version (10096L) is out of date.

!7

p {
  defaultPCallPolicy_set(error -> {}); // Disable printStackTrace on pcall
  addGlobalLastErrorsBufferToDefaultPCallPolicy();
  pcall { fail("oopsie"); }
  var errors = globalLastErrorsBuffer().asList();
  assertEqualsVerbose(1, l(errors));
  assertContainsVerbose("oopsie", str(first(errors)));
  print("All OK");
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

-
Snippet ID: #1036411
Snippet name: Test addGlobalLastErrorsBufferToDefaultPCallPolicy (OK)
Eternal ID of this version: #1036411/9
Text MD5: 20e439e2eef088288605f6f83b0351a1
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-12-11 13:59:42
Source code size: 334 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 203 / 639
Version history: 8 change(s)
Referenced in: