• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

knowledgepixels / nanodash / 30430669996

29 Jul 2026 07:10AM UTC coverage: 34.372% (+0.5%) from 33.91%
30430669996

push

github

web-flow
Merge pull request #569 from knowledgepixels/270-nanopub-not-found-handling

feat: add a "nanopub not found" page (#270)

2460 of 7910 branches covered (31.1%)

Branch coverage included in aggregate %.

4801 of 13215 relevant lines covered (36.33%)

5.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
src/main/java/com/knowledgepixels/nanodash/page/ErrorPage.java
1
package com.knowledgepixels.nanodash.page;
2

3
import com.knowledgepixels.nanodash.component.TitleBar;
4
import org.apache.wicket.markup.html.basic.Label;
5
import org.apache.wicket.request.http.WebResponse;
6
import org.apache.wicket.request.mapper.parameter.PageParameters;
7

8
/**
9
 * ErrorPage is a Wicket page that serves as a generic error page.
10
 */
11
public class ErrorPage extends NanodashPage {
12

13
    /**
14
     * The mount path for the error page.
15
     */
16
    public static final String MOUNT_PATH = "/error";
17

18
    /**
19
     * Page parameter holding an optional message with details about what went wrong. It
20
     * is shown to the user, so it should explain the problem in plain words rather than
21
     * expose internals.
22
     */
23
    public static final String MESSAGE_PARAM = "message";
24

25
    /**
26
     * {@inheritDoc}
27
     */
28
    @Override
29
    public String getMountPath() {
30
        return MOUNT_PATH;
×
31
    }
32

33
    /**
34
     * Default constructor for ErrorPage.
35
     * Initializes the page with the provided parameters.
36
     *
37
     * @param parameters Page parameters to initialize the page.
38
     */
39
    public ErrorPage(final PageParameters parameters) {
40
        super(parameters);
9✔
41
        add(new TitleBar("titlebar", this, null));
48✔
42
        String message = parameters.get(MESSAGE_PARAM).toString("");
18✔
43
        add(new Label("message", message).setVisible(!message.isBlank()));
60✔
44
    }
3✔
45

46
    /**
47
     * {@inheritDoc}
48
     */
49
    @Override
50
    protected void configureResponse(WebResponse response) {
51
        super.configureResponse(response);
9✔
52
    }
3✔
53

54
    /**
55
     * {@inheritDoc}
56
     */
57
    @Override
58
    public boolean isVersioned() {
59
        return false;
6✔
60
    }
61

62
    /**
63
     * {@inheritDoc}
64
     */
65
    @Override
66
    public boolean isErrorPage() {
67
        return true;
×
68
    }
69

70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc