|
1 | | -ERROR com.io7m.ghrepostools.Main : The specified command does not exist. |
2 | | - Command : README |
3 | | - Error Code : command-nonexistent |
4 | | - |
5 | | -DEBUG com.io7m.ghrepostools.Main : Exception: |
6 | | -com.io7m.quarrel.core.QException: The specified command does not exist. |
7 | | - at com.io7m.quarrel.core.QApplication.parseExpanded(QApplication.java:244) |
8 | | - at com.io7m.quarrel.core.QApplication.parse(QApplication.java:152) |
9 | | - at com.io7m.quarrel.core.QApplicationType.run(QApplicationType.java:94) |
10 | | - at com.io7m.ghrepostools.Main.run(Main.java:126) |
11 | | - at com.io7m.ghrepostools.Main.mainExitless(Main.java:110) |
12 | | - at com.io7m.ghrepostools.Main.main(Main.java:95) |
| 1 | +taskrecorder |
| 2 | +=== |
| 3 | + |
| 4 | +[](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.io7m.taskrecorder%22) |
| 5 | +[](https://central.sonatype.com/repository/maven-snapshots/com/io7m/taskrecorder/) |
| 6 | +[](https://codecov.io/gh/io7m-com/taskrecorder) |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +| JVM | Platform | Status | |
| 12 | +|-----|----------|--------| |
| 13 | +| OpenJDK (Temurin) Current | Linux | [](https://www.github.com/io7m-com/taskrecorder/actions?query=workflow%3Amain.linux.temurin.current)| |
| 14 | +| OpenJDK (Temurin) LTS | Linux | [](https://www.github.com/io7m-com/taskrecorder/actions?query=workflow%3Amain.linux.temurin.lts)| |
| 15 | +| OpenJDK (Temurin) Current | Windows | [](https://www.github.com/io7m-com/taskrecorder/actions?query=workflow%3Amain.windows.temurin.current)| |
| 16 | +| OpenJDK (Temurin) LTS | Windows | [](https://www.github.com/io7m-com/taskrecorder/actions?query=workflow%3Amain.windows.temurin.lts)| |
| 17 | + |
| 18 | +## Repository Relocation |
| 19 | + |
| 20 | +Development of this project has moved to an |
| 21 | +[open-source but not open-contribution](https://sqlite.org/copyright.html#notopencontrib) |
| 22 | +model. |
| 23 | + |
| 24 | +Source code and commits will remain publicly available perpetually, but issues |
| 25 | +and/or pull requests will be rejected and/or ignored. Additionally, this project |
| 26 | +will now only be available via a read-only mirror at: |
| 27 | + |
| 28 | + https://codeberg.org/io7m-com/taskrecorder |
| 29 | + |
| 30 | + |
| 31 | +## taskrecorder |
| 32 | + |
| 33 | +The `taskrecorder` package provides a simple abstraction to record the steps |
| 34 | +(and subtasks) performed during the execution of tasks within an application. |
| 35 | + |
| 36 | +## Features |
| 37 | + |
| 38 | +* Record detailed task steps for informative error reports. |
| 39 | +* High coverage test suite. |
| 40 | +* [OSGi-ready](https://www.osgi.org/) |
| 41 | +* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System) |
| 42 | +* ISC license. |
| 43 | + |
| 44 | +## Usage |
| 45 | + |
| 46 | +Create a new task, and create steps and subtasks as the application performs |
| 47 | +operations: |
| 48 | + |
| 49 | +``` |
| 50 | +final Logger logger; |
| 51 | +final TRTaskRecorderType<Integer> recorder = |
| 52 | + TRTaskRecorder.create(logger, "Book Flight"); |
| 53 | +
|
| 54 | +recorder.beginStep("Picking best airline price..."); |
| 55 | +Airline airline; |
| 56 | +try { |
| 57 | + airline = pickAirline(); |
| 58 | + recorder.setStepSucceeded("Found airline."); |
| 59 | +} catch (Exception e) { |
| 60 | + recorder.setTaskFailed("No price available.", e); |
| 61 | + return; |
| 62 | +} |
| 63 | +
|
| 64 | +recorder.beginStep("Making reservation..."); |
| 65 | +try { |
| 66 | + int id = makeReservation(airline); |
| 67 | + recorder.setTaskSucceeded("Created reservation.", id); |
| 68 | +} catch (Exception e) { |
| 69 | + recorder.setTaskFailed("No reservations available.", e); |
| 70 | + return; |
| 71 | +} |
| 72 | +
|
| 73 | +var task = recorder.toTask(); |
| 74 | +assert task.resolution() instanceof TRSucceeded; |
| 75 | +``` |
| 76 | + |
0 commit comments