Decorative site banner
Project icon

com.io7m.miscue

  • About
  • Releases
  • Manual
  • Sources
  • License
  • Issues
Maven Central Version Maven Snapshot Code Coverage

miscue


JavaFX component for displaying error dialogs.

Features


  • Display error dialogs containing structured errors.
  • Written in pure Java 21.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Usage


Given a structured error value:

SStructuredErrorType<String> error;

Create a new dialog and display it:

MSErrorDialogs.builder(error) .build() .showAndWait();

The contents of the dialog depends on the data present in the error value.

If only a message is present, the message will be displayed:

Message Only

If attributes are present, they will be displayed in a table below the message:

Attributes

If an exception is present, it will be displayed:

Exception

If a remediating action is present, it will be displayed:

Remediation

Any combination of the above is possible:

All

Reporting


If a reporting callback is provided to the builder, it will be evaluated when the user clicks the provided Report button. If no callback is provided, the Report button is disabled. The callback should be tied to your application's error reporting functionality.

MSErrorDialogs.builder(error) .setErrorReportCallback(() -> { LOG.debug("Pretending to send an error report..."); }) .build() .showAndWait();

CSS


All elements within an error dialog are assigned CSS classes:

CSS

A custom stylesheet can be specified to the dialog builder:

MSErrorDialogs.builder(error) .setCSS(URI.create("/path/to/custom.css")) .build() .showAndWait();

With great power comes great responsibility.

CSS Power

Demo


A demo application is included.

Releases & Development Snapshots


Releases


You can subscribe to the atom feed to be notified of project releases.

No formal releases have been made yet.

Development Snapshots


At the time of writing, the current unstable development version of the package is 0.0.3-SNAPSHOT.

Development snapshots may be available in the Central Portal Snapshots repository. Snapshots are published to this repository every time the project is built by the project's continuous integration system, but snapshots do expire after around ninety days and so may or may not be available depending on when a build of the package was last triggered.

Manual


This project does not have any user manuals or other documentation beyond what might be present on the page above.

Sources


This project uses Git to manage source code.

Repository: https://www.github.com/io7m-com/miscue

$ git clone --recursive https://www.github.com/io7m-com/miscue

Issues


This project uses GitHub Issues to track issues.

License


Copyright © 2024 Mark Raynsford <code@io7m.com> https://www.io7m.com Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Last Updated 2025-08-09T14:58:06Z