Runs a function and creates log output. @param info log string @param status close status (can be null) @param func function to be run
(final String info, final Integer status, final Runnable func)
| 194 | * @param func function to be run |
| 195 | */ |
| 196 | private void run(final String info, final Integer status, final Runnable func) { |
| 197 | context.log.write(LogType.REQUEST, info, null, context); |
| 198 | final Performance perf = new Performance(); |
| 199 | try { |
| 200 | func.run(); |
| 201 | } catch(final Exception ex) { |
| 202 | context.log.write(LogType.ERROR, "", perf, context); |
| 203 | throw ex; |
| 204 | } |
| 205 | context.log.write(status != null ? status : LogType.OK, null, perf, context); |
| 206 | } |
| 207 | } |
no test coverage detected