Scoop API

scoop:scoop.platform:0.1.0

src/system/native_error.scoop

Selected production source · src/system/native_error.scoop

1package scoop.platform.system
3internal fun failOperatingSystem(operation: String, code: Int, context: OsString? = None): Nothing {
4 val domain =
5 if (operatingSystem == OperatingSystem.Windows)
6 NativeErrorDomain.Win32
7 else
8 NativeErrorDomain.PosixErrno
9 val error = NativeError(domain, code)
10 throw PlatformException(operation, error.kind, Some(error), context)