Fix mk pipelines testing job error handling

Change-Id: I2eb035f2bc5f4757a4cc6369abb014273c969623
diff --git a/test-groovy-pipeline.groovy b/test-groovy-pipeline.groovy
index c63593f..10d8ece 100644
--- a/test-groovy-pipeline.groovy
+++ b/test-groovy-pipeline.groovy
@@ -31,10 +31,12 @@
 
     } catch (Throwable e) {
         currentBuild.result = 'FAILURE'
-        def errLog = readFile('build/reports/codenarc/main.txt')
-        if(errLog){
-            print "Error log: ${errLog}"
-        }
+        try{
+            def errLog = readFile('build/reports/codenarc/main.txt')
+            if(errLog){
+                common.errorMsg("Error log: ${errLog}")
+            }
+        }catch(ex){}
         throw e
     } finally {
         // send notification