Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for runCatching (0.21 sec)

  1. platforms/core-configuration/kotlin-dsl-tooling-builders/src/main/kotlin/org/gradle/kotlin/dsl/tooling/builders/internal/IsolatedProjectsSafeKotlinDslScriptsModelBuilder.kt

    import org.gradle.kotlin.dsl.accessors.AccessorsClassPath
    import org.gradle.kotlin.dsl.provider.ClassPathModeExceptionCollector
    import org.gradle.kotlin.dsl.provider.KotlinScriptClassPathProvider
    import org.gradle.kotlin.dsl.provider.runCatching
    import org.gradle.kotlin.dsl.resolver.SourceDistributionResolver
    import org.gradle.kotlin.dsl.resolver.SourcePathProvider
    import org.gradle.kotlin.dsl.support.ImplicitImports
    import org.gradle.kotlin.dsl.support.filter
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 02 11:06:08 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/provider/ClassPathModeExceptionCollector.kt

        fun collect(error: Exception) {
            collection.add(error)
        }
    
        override fun stop() {
            collection.clear()
        }
    }
    
    
    inline fun <T> ClassPathModeExceptionCollector.runCatching(f: () -> T): T? =
        try {
            f()
        } catch (e: Exception) {
            collect(e)
            null
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Dec 16 19:10:37 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/concurrent/DefaultAsyncIOScopeFactoryTest.kt

        private
        fun awaitExceptionFrom(scope: IOScope) =
            await atMost ONE_SECOND untilNotNull { exceptionOrNullFrom { scope.io { } } }
    
        private
        fun exceptionOrNullFrom(action: () -> Unit) = runCatching(action).exceptionOrNull()
    
        private
        fun withAsyncIOScopeFactory(
            settings: AsyncIOScopeSettings = JavaSystemPropertiesAsyncIOScopeSettings(),
            action: DefaultAsyncIOScopeFactory.() -> Unit
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  4. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/symbols/AbstractSymbolTest.kt

                val regularPointer = ktSymbol.runCatching {
                    createPointerForTest(disablePsiBasedSymbols = false)
                }.let {
                    if (directiveToIgnoreSymbolRestore == null) it.getOrThrow() else it.getOrNull()
                } ?: return null
    
                assertSymbolPointer(regularPointer, testServices)
                val nonPsiPointer = ktSymbol.runCatching {
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 29 17:43:55 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  5. platforms/core-configuration/kotlin-dsl-tooling-builders/src/main/kotlin/org/gradle/kotlin/dsl/tooling/builders/KotlinBuildScriptModelBuilder.kt

            val accessorsClassPath =
                classPathModeExceptionCollector.runCatching {
                    accessorsClassPath(scriptClassPath)
                } ?: AccessorsClassPath.empty
    
            val additionalImports =
                classPathModeExceptionCollector.runCatching {
                    additionalImports()
                } ?: emptyList()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 02 11:06:08 UTC 2024
    - 17.8K bytes
    - Viewed (0)
  6. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/resolver/KotlinBuildScriptModelRepository.kt

                }
                process(group)
            }
        }
    
        private
        fun process(group: List<AsyncModelRequest>) {
            val (mostRecentRequest, k) = group.first()
            val result = runCatching { fetch(mostRecentRequest) }
            resumeAll(supersededRequestsFrom(group), Result.success(null))
            resume(k, result)
        }
    
        private
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  7. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/provider/KotlinScriptEvaluator.kt

                )
            }
        }
    
        private
        inline fun withOptions(options: EvalOptions, action: () -> Unit) {
            if (EvalOption.IgnoreErrors in options)
                classPathModeExceptionCollector.runCatching(action)
            else
                action()
        }
    
        private
        fun setupEmbeddedKotlinForBuildscript(scriptHandler: ScriptHandler) {
            embeddedKotlinProvider.pinEmbeddedKotlinDependenciesOn(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 10:23:24 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  8. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/ProblemReportingCrossProjectModelAccess.kt

                action: DynamicObject.() -> DynamicInvokeResult,
                resultNotFoundExceptionProvider: DynamicObject.() -> GroovyRuntimeException
            ): Any? {
                val result = runCatching {
                    withDelegateDynamicCallIgnoringProblem(action, resultNotFoundExceptionProvider)
                }
    
                val memberKind = "extension"
                return when {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  9. operator/pkg/util/reflect_test.go

    		{
    			inDesc: "success both are int32 types",
    			inV1:   int32(42),
    			inV2:   int32(43),
    			want:   true,
    		},
    		{
    			inDesc: "fail unmatching int types",
    			inV1:   int16(42),
    			inV2:   int32(43),
    			want:   false,
    		},
    		{
    			inDesc: "fail unmatching int and string type",
    			inV1:   int32(42),
    			inV2:   "42",
    			want:   false,
    		},
    		{
    			inDesc: "fail EnumType and int64 types",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 10.2K bytes
    - Viewed (0)
  10. src/strings/search.go

    // the pattern is not found, it returns -1.
    func (f *stringFinder) next(text string) int {
    	i := len(f.pattern) - 1
    	for i < len(text) {
    		// Compare backwards from the end until the first unmatching character.
    		j := len(f.pattern) - 1
    		for j >= 0 && text[i] == f.pattern[j] {
    			i--
    			j--
    		}
    		if j < 0 {
    			return i + 1 // match
    		}
    		i += max(f.badCharSkip[text[i]], f.goodSuffixSkip[j])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 18:49:51 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top