original_string: public static function createDir($dir)
      {
          try {
              if (!is_dir($dir) && @mkdir($dir, 0775, true) === false) {
                  throw new \Exception(t('Can\'t create directory ') . $dir);
              }
          } catch (\Exception $e) {
              Logger::log($e->getMessage(), LOG_WARNING);
              if (!file_exists(dirname($dir))) {
                  throw new GeneratorException($e->getMessage() . $dir);
              }
          }
      }
code: public static function createDir($dir)
      {
          try {
              if (!is_dir($dir) && @mkdir($dir, 0775, true) === false) {
                  throw new \Exception(t('Can\'t create directory ') . $dir);
              }
          } catch (\Exception $e) {
              Logger::log($e->getMessage(), LOG_WARNING);
              if (!file_exists(dirname($dir))) {
                  throw new GeneratorException($e->getMessage() . $dir);
              }
          }
      }
code_tokens: public static function createDir ( $ dir ) { try { if ( ! is_dir ( $ dir ) && @ mkdir ( $ dir , 0775 , true ) === false ) { throw new \ Exception ( t ( 'Can\'t create directory ' ) . $ dir ) ; } } catch ( \ Exception $ e ) { Logger :: log ( $ e -> getMessage ( ) , LOG_WARNING ) ; if ( ! file_exists ( dirname ( $ dir ) ) ) { throw new GeneratorException ( $ e -> getMessage ( ) . $ dir ) ; } } }
docstring: Method that creates any parametrized path
  @param string $dir
  @throws GeneratorException
docstring_tokens: Method that creates any parametrized path