code: func CheckError(err error) {
  	if err == nil {
  		return
  	}
  
  	if e, ok := err.(Error); ok {
  		glog.Errorf("An error occurred: %v", e)
  		glog.Errorf("Suggested solution: %v", e.Suggestion)
  		if e.Details != nil {
  			glog.V(1).Infof("Details: %v", e.Details)
  		}
  		glog.Error("If the problem persists consult the docs at https://github.com/openshift/source-to-image/tree/master/docs. " +
  			"Eventually reach us on freenode #openshift or file an issue at https://github.com/openshift/source-to-image/issues " +
  			"providing us with a log from your build using log output level 3.")
  		os.Exit(e.ErrorCode)
  	} else {
  		glog.Errorf("An error occurred: %v", err)
  		os.Exit(1)
  	}
  }
docs: // CheckError checks input error.
  // 1. if the input error is nil, the function does nothing but return.
  // 2. if the input error is a kind of Error which is thrown during S2I execution,
  // the function handle it with Suggestion and Details.
  // 3. if the input error is a kind of system Error which is unknown, the function exit with 1.