mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
Python: introduce failure as a sugar over Result.failure(Throwable(userVisibleText))
GitOrigin-RevId: cefb5234d830f4e306e385161dd07d35eb12989b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1760e006dc
commit
6a9aebe3e6
@@ -0,0 +1,8 @@
|
||||
package com.jetbrains.extensions
|
||||
|
||||
import com.intellij.openapi.util.NlsSafe
|
||||
|
||||
/**
|
||||
* [Result] failure with user-readable error
|
||||
*/
|
||||
fun <T> failure(error: @NlsSafe String): Result<T> = Result.failure(Throwable(error))
|
||||
Reference in New Issue
Block a user