I would skip this through a while loop to check every line of output. eg,
cmd &| while read line;do if [[ ${line} =~ ErrorRegex ]];then echo Error Detected: $line; else echo $line; fi;done
to break it into "& |" redirects stderr and stdout to a while loop, which reads 1 line of input at a time and puts it in a string variable. then a simple regular expression comparison searches for a string with an error, and you can select that string or write it somewhere anywhere that you like, really go crazy. If it does not match the error, it simply prints the output as usual.
source share