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

hazendaz / sitemesh2 / 59

22 Mar 2026 02:30AM UTC coverage: 40.347%. Remained the same
59

push

github

hazendaz
[mvn] Update maven wrapper

698 of 1891 branches covered (36.91%)

Branch coverage included in aggregate %.

1555 of 3693 relevant lines covered (42.11%)

0.42 hits per line

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

0.0
/src/main/java/com/opensymphony/module/sitemesh/factory/FactoryException.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 * Copyright 2011-2026 Hazendaz
4
 */
5
/*
6
 * Title:        FactoryException
7
 * Description:
8
 *
9
 * This software is published under the terms of the OpenSymphony Software
10
 * License version 1.1, of which a copy has been included with this
11
 * distribution in the LICENSE.txt file.
12
 */
13

14
package com.opensymphony.module.sitemesh.factory;
15

16
import java.io.PrintStream;
17
import java.io.PrintWriter;
18

19
/**
20
 * This RuntimeException is thrown by the Factory if it cannot initialize or perform an appropriate function.
21
 *
22
 * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
23
 */
24
public class FactoryException extends RuntimeException {
25

26
    /** The Constant serialVersionUID. */
27
    private static final long serialVersionUID = 1L;
28

29
    /** The exception. */
30
    protected Throwable exception;
31

32
    /**
33
     * Instantiates a new factory exception.
34
     */
35
    public FactoryException() {
×
36
    }
×
37

38
    /**
39
     * Instantiates a new factory exception.
40
     *
41
     * @param msg
42
     *            the msg
43
     */
44
    public FactoryException(String msg) {
45
        super(msg);
×
46
    }
×
47

48
    /**
49
     * Instantiates a new factory exception.
50
     *
51
     * @param e
52
     *            the e
53
     */
54
    public FactoryException(Exception e) {
×
55
        exception = e;
×
56
    }
×
57

58
    /**
59
     * Instantiates a new factory exception.
60
     *
61
     * @param msg
62
     *            the msg
63
     * @param e
64
     *            the e
65
     */
66
    public FactoryException(String msg, Throwable e) {
67
        super(msg + ": " + e);
×
68
        exception = e;
×
69
    }
×
70

71
    /**
72
     * Get the original cause of the Exception. Returns null if not known.
73
     *
74
     * @return the root cause
75
     */
76
    public Throwable getRootCause() {
77
        return exception;
×
78
    }
79

80
    @Override
81
    public void printStackTrace() {
82
        super.printStackTrace();
×
83
        if (exception != null) {
×
84
            synchronized (System.err) {
×
85
                System.err.println("\nRoot cause:");
×
86
                exception.printStackTrace();
×
87
            }
×
88
        }
89
    }
×
90

91
    @Override
92
    public void printStackTrace(PrintStream s) {
93
        super.printStackTrace(s);
×
94
        if (exception != null) {
×
95
            synchronized (s) {
×
96
                s.println("\nRoot cause:");
×
97
                exception.printStackTrace(s);
×
98
            }
×
99
        }
100
    }
×
101

102
    @Override
103
    public void printStackTrace(PrintWriter s) {
104
        super.printStackTrace(s);
×
105
        if (exception != null) {
×
106
            synchronized (s) {
×
107
                s.println("\nRoot cause:");
×
108
                exception.printStackTrace(s);
×
109
            }
×
110
        }
111
    }
×
112
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc