Home
last modified time | relevance | path

Searched refs:ArgParseError (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/commandline/
DValueParser.kt139 ?: Result.failure(ArgParseError("Failed to transform value $value")) in map()
154 ?: Result.failure(ArgParseError("Failed to parse $value as a boolean")) in value()
159 ?: Result.failure(ArgParseError("Failed to parse $value as an int")) in value()
164 ?: Result.failure(ArgParseError("Failed to parse $value as a float")) in value()
DParameters.kt185 throw ArgParseError("no argument provided for $shortName") in getValue()
195 data class ArgParseError(override val message: String) : Exception(message) class
DParseableCommand.kt118 } catch (e: ArgParseError) { in execute()
157 open fun onParseFailed(error: ArgParseError) {} in onParseFailed()
DCommandParser.kt112 throw ArgParseError("Unknown token: $token") in parse()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/commandline/
DCommandParserTest.kt40 assertThrows(ArgParseError::class.java) { parser.parse(listOf("unknown-token")) } in unknownToken_throws()
74 assertThrows(ArgParseError::class.java) { parser.parse(listOf("-p")) } in parseSingleOptionalParam_missingArg_throws()
93 assertThrows(ArgParseError::class.java) { parser.parse(listOf("-p")) } in parseSingleRequiredParam_missingArg_throws()
DParseableCommandTest.kt147 assertThrows(ArgParseError::class.java) { cmd.parser.parse(throwingCommand) } in executeDoesNotPropagateExceptions()
162 override fun onParseFailed(error: ArgParseError) { in executeFailingCommand_callsOnParseFailed()
237 assertThrows(ArgParseError::class.java) { cmd.execute(pw, cli) } in commandWithRequiredParam_not_provided_throws()