original_string: public function exception($errorMsg,  array $trace, $error = true )
      {
          $classException = "CheckoutApi_Lib_ExceptionState";
  
          if (class_exists($classException)) {
  
              /** @var CheckoutApi_Lib_ExceptionState $class */
              $class = CheckoutApi_Lib_Factory::getSingletonInstance($classException);
                
          } else {
              
              throw new Exception("Not a valid class ::  CheckoutApi_Lib_ExceptionState");
              
          } 
  
          $class->setLog($errorMsg,$trace,$error);
  
          return $class;
          
      }
code: public function exception($errorMsg,  array $trace, $error = true )
      {
          $classException = "CheckoutApi_Lib_ExceptionState";
  
          if (class_exists($classException)) {
  
              /** @var CheckoutApi_Lib_ExceptionState $class */
              $class = CheckoutApi_Lib_Factory::getSingletonInstance($classException);
                
          } else {
              
              throw new Exception("Not a valid class ::  CheckoutApi_Lib_ExceptionState");
              
          } 
  
          $class->setLog($errorMsg,$trace,$error);
  
          return $class;
          
      }
code_tokens: public function exception ( $ errorMsg , array $ trace , $ error = true ) { $ classException = "CheckoutApi_Lib_ExceptionState" ; if ( class_exists ( $ classException ) ) { /** @var CheckoutApi_Lib_ExceptionState $class */ $ class = CheckoutApi_Lib_Factory :: getSingletonInstance ( $ classException ) ; } else { throw new Exception ( "Not a valid class ::  CheckoutApi_Lib_ExceptionState" ) ; } $ class -> setLog ( $ errorMsg , $ trace , $ error ) ; return $ class ; }
docstring: setting and logging error message
  @param string $errorMsg error message you wan to log
  @param array $trace stack trace
  @param bool $error state of the error. true for important error
  @return mixed
  @throws Exception
docstring_tokens: setting and logging error message