- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for LocationAwareException (0.31 sec)
-
subprojects/core/src/main/java/org/gradle/internal/exceptions/LocationAwareException.java
import javax.annotation.Nullable; /** * A {@code LocationAwareException} is an exception which can be annotated with a location in a script. */ @UsedByScanPlugin public class LocationAwareException extends ContextAwareException implements FailureResolutionAware { private final String sourceDisplayName; private final Integer lineNumber; public LocationAwareException(Throwable cause, ScriptSource source, Integer lineNumber) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Jan 12 19:30:55 UTC 2024 - 3.6K bytes - Viewed (0) -
subprojects/core/src/test/groovy/org/gradle/initialization/exception/DefaultExceptionAnalyserTest.groovy
def transformedFailure = result[0] transformedFailure instanceof LocationAwareException transformedFailure.cause.is(cause) } def 'uses deepest location aware exception'() { given: def cause = locationAwareException(null) def failure = locationAwareException(new RuntimeException(cause)) def result = [] when:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 05 19:36:14 UTC 2023 - 11.9K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl-tooling-builders/src/test/kotlin/org/gradle/kotlin/dsl/tooling/builders/EditorReportsBuilderTest.kt
val script = withTwoLinesScript() val reports = buildEditorReportsFor( script, listOf( LocationAwareException(java.lang.Exception(null as String?), script.canonicalPath, 1), LocationAwareException(java.lang.Exception(""), script.canonicalPath, 2) ), true ) assertThat(reports.size, equalTo(2))
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 4.2K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl-tooling-builders/src/main/kotlin/org/gradle/kotlin/dsl/tooling/builders/EditorReportsBuilder.kt
} } } private fun Sequence<Exception>.findLocationAwareExceptions(): Sequence<LocationAwareException> = mapNotNull(::firstLocationAwareCauseOrNull) private tailrec fun firstLocationAwareCauseOrNull(ex: Throwable): LocationAwareException? { if (ex is LocationAwareException) return ex val cause = ex.cause ?: return null return firstLocationAwareCauseOrNull(cause) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Jan 12 19:30:55 UTC 2024 - 6.2K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/initialization/exception/DefaultExceptionAnalyser.java
import org.gradle.api.tasks.TaskExecutionException; import org.gradle.groovy.scripts.ScriptCompilationException; import org.gradle.internal.exceptions.Contextual; import org.gradle.internal.exceptions.LocationAwareException; import org.gradle.internal.service.ServiceCreationException; import org.gradle.problems.Location; import org.gradle.problems.buildtree.ProblemDiagnosticsFactory; import java.lang.reflect.Field;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Mar 01 13:10:04 UTC 2024 - 6.2K bytes - Viewed (0) -
platforms/enterprise/enterprise/src/main/java/org/gradle/internal/enterprise/exceptions/ExceptionMetadataHelper.java
if (sceLineNumber != null) { metadata.put(METADATA_KEY_SCRIPT_LINE_NUMBER, sceLineNumber.toString()); } } if (t instanceof LocationAwareException) { LocationAwareException lae = (LocationAwareException) t; metadata.put(METADATA_KEY_SOURCE_DISPLAY_NAME, lae.getSourceDisplayName()); Integer laeLineNumber = lae.getLineNumber(); if (laeLineNumber != null) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Jul 17 10:17:11 UTC 2023 - 4.1K bytes - Viewed (0) -
subprojects/core/src/test/groovy/org/gradle/internal/buildevents/BuildExceptionReporterTest.groovy
{stacktrace} """ } def "report multiple failures and skip help link for NonGradleCauseException"() { def failure1 = new LocationAwareException(new TaskExecutionException(null, new TestNonGradleCauseException()), LOCATION, 42) def failure2 = new LocationAwareException(new TaskExecutionException(null, new TestCompilationFailureException()), LOCATION, 42) def failure3 = new RuntimeException("<error>")
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu May 09 11:33:46 UTC 2024 - 18.3K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/Interpreter.kt
} == true tailrec fun inferLocationFrom(exception: Throwable): LocationAwareException? { if (exception is LocationAwareException) { return exception } exception.stackTrace.find(::scriptStackTraceElement)?.run { return LocationAwareException(original, scriptSource, lineNumber.takeIf { it >= 0 }) }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Oct 26 19:59:56 UTC 2023 - 21.1K bytes - Viewed (0) -
platforms/extensibility/plugin-use/src/test/groovy/org/gradle/plugin/use/resolve/internal/CorePluginResolverTest.groovy
import org.gradle.api.internal.plugins.PluginImplementation import org.gradle.api.internal.plugins.PluginManagerInternal import org.gradle.api.internal.plugins.PluginRegistry import org.gradle.internal.exceptions.LocationAwareException import org.gradle.plugin.management.internal.DefaultPluginRequest import org.gradle.plugin.management.internal.InvalidPluginRequestException import org.gradle.plugin.management.internal.PluginRequestInternal
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Jan 12 20:19:43 UTC 2024 - 4.1K bytes - Viewed (0) -
platforms/enterprise/enterprise/src/test/groovy/org/gradle/internal/enterprise/exceptions/ExceptionMetadataHelperTest.groovy
import org.gradle.groovy.scripts.ScriptCompilationException import org.gradle.groovy.scripts.TextResourceScriptSource import org.gradle.internal.exceptions.DefaultMultiCauseException import org.gradle.internal.exceptions.LocationAwareException import org.gradle.internal.file.RelativeFilePathResolver import org.gradle.internal.resource.UriTextResource import org.gradle.util.Path import spock.lang.Specification
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Jul 17 10:17:11 UTC 2023 - 4.6K bytes - Viewed (0)