From 633516b75a8ee26fcfcdf0c61ba762fd56282244 Mon Sep 17 00:00:00 2001 From: "baron@percona.com" <> Date: Sun, 4 Mar 2012 14:33:48 -0800 Subject: [PATCH] Print meaningful error message for wrong --type (fixes bug 946438) --- bin/pt-query-digest | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/pt-query-digest b/bin/pt-query-digest index 650a0526..3ac2b16c 100755 --- a/bin/pt-query-digest +++ b/bin/pt-query-digest @@ -12350,6 +12350,11 @@ sub main { ); }; if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR =~ m/perhaps you forgot to load/ ) { + # There is no module to handle --type, so wrong --type + die "'$module' is not a valid input type. " + . "Please check the documentation for --type.\n"; + } die "Failed to load $module module: $EVAL_ERROR"; }