Improve unsupported text (#27186)

This commit is contained in:
Danny Tuppeny
2019-01-28 17:51:23 +00:00
committed by GitHub
parent 64a1ce011a
commit d5fd57cfbd

View File

@@ -508,7 +508,9 @@ abstract class ResidentRunner {
bool get supportsRestart => false;
Future<OperationResult> restart({ bool fullRestart = false, bool pauseAfterRestart = false, String reason }) {
throw 'unsupported';
final String mode = isRunningProfile ? 'profile' :
isRunningRelease ? 'release' : 'this';
throw '${fullRestart ? 'Restart' : 'Reload'} is not supported in $mode mode';
}
Future<void> stop() async {