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

TAKETODAY / today-infrastructure / 18154768944

01 Oct 2025 07:26AM UTC coverage: 81.882% (-0.005%) from 81.887%
18154768944

push

github

web-flow
Merge pull request #290 from TAKETODAY/dev/jspecify

jspecify

59788 of 78013 branches covered (76.64%)

Branch coverage included in aggregate %.

141239 of 167496 relevant lines covered (84.32%)

3.6 hits per line

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

18.75
today-context/src/main/java/infra/scripting/ScriptCompilationException.java
1
/*
2
 * Copyright 2017 - 2025 the original author or authors.
3
 *
4
 * This program is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation, either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program. If not, see [https://www.gnu.org/licenses/]
16
 */
17

18
package infra.scripting;
19

20
import org.jspecify.annotations.Nullable;
21

22
import infra.core.NestedRuntimeException;
23

24
/**
25
 * Exception to be thrown on script compilation failure.
26
 *
27
 * @author Juergen Hoeller
28
 * @author <a href="https://github.com/TAKETODAY">Harry Yang</a>
29
 * @since 4.0
30
 */
31
public class ScriptCompilationException extends NestedRuntimeException {
32

33
  @Nullable
34
  private final ScriptSource scriptSource;
35

36
  /**
37
   * Constructor for ScriptCompilationException.
38
   *
39
   * @param msg the detail message
40
   */
41
  public ScriptCompilationException(String msg) {
42
    super(msg);
×
43
    this.scriptSource = null;
×
44
  }
×
45

46
  /**
47
   * Constructor for ScriptCompilationException.
48
   *
49
   * @param msg the detail message
50
   * @param cause the root cause (usually from using an underlying script compiler API)
51
   */
52
  public ScriptCompilationException(String msg, Throwable cause) {
53
    super(msg, cause);
×
54
    this.scriptSource = null;
×
55
  }
×
56

57
  /**
58
   * Constructor for ScriptCompilationException.
59
   *
60
   * @param scriptSource the source for the offending script
61
   * @param msg the detail message
62
   * @since 4.0
63
   */
64
  public ScriptCompilationException(ScriptSource scriptSource, String msg) {
65
    super("Could not compile " + scriptSource + ": " + msg);
×
66
    this.scriptSource = scriptSource;
×
67
  }
×
68

69
  /**
70
   * Constructor for ScriptCompilationException.
71
   *
72
   * @param scriptSource the source for the offending script
73
   * @param cause the root cause (usually from using an underlying script compiler API)
74
   */
75
  public ScriptCompilationException(ScriptSource scriptSource, Throwable cause) {
76
    super("Could not compile " + scriptSource, cause);
6✔
77
    this.scriptSource = scriptSource;
3✔
78
  }
1✔
79

80
  /**
81
   * Constructor for ScriptCompilationException.
82
   *
83
   * @param scriptSource the source for the offending script
84
   * @param msg the detail message
85
   * @param cause the root cause (usually from using an underlying script compiler API)
86
   */
87
  public ScriptCompilationException(ScriptSource scriptSource, String msg, Throwable cause) {
88
    super("Could not compile " + scriptSource + ": " + msg, cause);
×
89
    this.scriptSource = scriptSource;
×
90
  }
×
91

92
  /**
93
   * Return the source for the offending script.
94
   *
95
   * @return the source, or {@code null} if not available
96
   */
97
  @Nullable
98
  public ScriptSource getScriptSource() {
99
    return this.scriptSource;
×
100
  }
101

102
}
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