From ff13a26e8a57e6212c0fe32e78b7897c52255c27 Mon Sep 17 00:00:00 2001 From: Branan Purvine-Riley Date: Sun, 16 Mar 2014 14:38:49 -0700 Subject: [PATCH] Add better error handling to app.event console command --- .../Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp index 45fa4495..30a2e19a 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp @@ -2144,8 +2144,18 @@ PF_CONSOLE_CMD( App, if( !stricmp(eventStr, "Time") ) { event = kTime; + if (numParams < 2) + { + PrintString("'Time' expects a timestamp (in seconds)"); + return; + } secs = params[2]; } + else + { + PrintString("Unknown event type. Options are 'Start', 'Stop', and 'Time'"); + return; + } if( numParams > 3 ) { reps = params[3];