()
| 92 | } |
| 93 | |
| 94 | public void test() throws InterruptedException { |
| 95 | Transaction t = Cat.newTransaction("Neocortex", "function1"); |
| 96 | try { |
| 97 | int a = functionA(); |
| 98 | |
| 99 | if (a < 0) { |
| 100 | Cat.logError(new RuntimeException("sdsf")); |
| 101 | } |
| 102 | |
| 103 | MessageTree tree = TraceContextHelper.threadLocal().getMessageTree(); |
| 104 | |
| 105 | ((DefaultMessageTree) tree).setDomain("NeoCortex"); |
| 106 | t.setStatus(Transaction.SUCCESS); |
| 107 | } catch (Exception e) { |
| 108 | |
| 109 | Cat.logError(e); |
| 110 | t.setStatus(e); |
| 111 | |
| 112 | } finally { |
| 113 | t.complete(); |
| 114 | } |
| 115 | |
| 116 | } |
| 117 | |
| 118 | private int functionA() { |
| 119 |
no test coverage detected