Sets/Unsets user error catch function. It is used to catch warnings

@param boolean $catchwarnings (true|false) to set or unset warnings catch
14399
public function setCatchWarnings($catchwarnings = true) {
		if ($catchwarnings && !$this->warninghandlerset) {
			set_error_handler(array($this, 'warningHandler'));
			$this->warninghandlerset = true;
		} elseif ($this->warninghandlerset) {
			restore_error_handler();
			$this->warninghandlerset = false;
		}
	}
575926
public static function stop($throw = false)
    {
        $errorException = null;

        if (static::$stack) {
            $errorException = array_pop(static::$stack);

            if (!static::$stack) {
                restore_error_handler();
            }

            if ($errorException && $throw) {
                throw $errorException;
            }
        }

        return $errorException;
    }
540239
public function halt($errors = null)
    {
        // Display errors
        if ($errors) {
            $this->explainer->error($errors);
        }

        $this->fireEvent('halt');
        $this->halted = true;

        if ($this->event) {
            $this->getEvent()->stopPropagation();
        }

        return false;
    }
1012679
public void setShareErrors(java.util.Collection<ShareError> shareErrors) {
        if (shareErrors == null) {
            this.shareErrors = null;
            return;
        }

        this.shareErrors = new java.util.ArrayList<ShareError>(shareErrors);
    }
1212618
func (s *UpdateConfigurationResponse) SetWarnings(v []*SanitizationWarning) *UpdateConfigurationResponse {
	s.Warnings = v
	return s
}
1087251
public function setValidationRules($validationRules)
    {
        if (! is_array($validationRules)) {
            $validationRules = func_get_args();
        }

        $this->validationRules = [];
        foreach ($validationRules as $rule) {
            if ($rule instanceof \Illuminate\Validation\Rule || $rule instanceof \Illuminate\Contracts\Validation\Rule || $rule instanceof Dimensions || $rule instanceof Exists || $rule instanceof In || $rule instanceof NotIn || $rule instanceof Unique) {
                $this->addValidationRule($rule);
            } else {
                $rules = explode('|', $rule);
                foreach ($rules as $addRule) {
                    $this->addValidationRule($addRule);
                }
            }
        }

        return $this;
    }
921597
public function unbindHandler($exceptionTypes)
    {
        if (! is_array($exceptionTypes)) {
            $exceptionTypes = [$exceptionTypes];
        }

        foreach ($exceptionTypes as $exceptionType) {
            // TODO : remplacer par un array_key_exist
            if (isset($this->handlers[$exceptionType])) {
                unset($this->handlers[$exceptionType]);
            }
        }
    }
1011717
public function setErrorHandling( $errorHandling )
    {
        if ( $errorHandling != eZDB::ERROR_HANDLING_EXCEPTIONS &&
             $errorHandling != eZDB::ERROR_HANDLING_STANDARD )
            throw new RuntimeException( "Unknown eZDB error handling mode $errorHandling" );

        $this->errorHandling = $errorHandling;
    }
1171034
public function setErrors($errors = array())
    {
        foreach ($errors as $error) {
            if (!$error instanceof ConstraintViolation) {
                throw new \InvalidArgumentException(sprintf('The supplied error is of class "%s", while a "Symfony\Component\Validator\ConstraintViolation" was expected.', get_class($error)));
            }
        }

        $this->errors = $errors;
    }
314531
public function setErrorReporting() {
        if (true ===  $this->_config->getConfigData('development_environment')) {
            error_reporting(E_ALL);
            ini_set('display_errors', 'On');

            ErrorHandler::register();
        } else {
            error_reporting(E_ALL);
            ini_set('display_errors', 'Off');
            ini_set('log_errors', 'On');
            ini_set('error_log', ROOT . DS . 'tmp' . DS . 'logs' . DS . 'error.log');
        }
    }
964013
public static function set(): ?callable
    {
        if (! static::$handler) {
            static::$handler = function ($severity, $message, $file, $line): void {
                throw new \ErrorException($message, 0, $severity, $file, $line);
            };
        }

        return set_error_handler(static::$handler, E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
    }
92718
final public static function setError (string $errorMessage=NULL) : bool
	{
		static::$error = "";
		if (!static::hasValue($errorMessage)) return FALSE;
		static::$error = "Check the following field(s) ".stripComma($errorMessage)." and try again.";
		return TRUE;
	}
751612
public function setErrorHandler()
    {
        set_error_handler(function ($errno, $errstr, $errfile, $errline ) {
            throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
        });
    }
949872
func (s *GetDocumentTextDetectionOutput) SetWarnings(v []*Warning) *GetDocumentTextDetectionOutput {
	s.Warnings = v
	return s
}
1125642
func (s *ImportDocumentationPartsOutput) SetWarnings(v []*string) *ImportDocumentationPartsOutput {
	s.Warnings = v
	return s
}
1282470
public function setFails(array $fails = null): void
    {
        if (!empty($fails)) {
            foreach ($fails as $fieldName => $fail) {
                $this->fails[$fieldName] = $fail;
            }
        }
    }
118625
private function set_errors( $errors )
    {
        if( count( $errors ) == 0 )
        {
            return;
        }
        
        $errors_array = array();
        foreach( $this->config->get_sections() as $section )
        {
            foreach( $section->get_fields() as $component )
            {
                if( $component instanceof \Amarkal\UI\ValidatableComponentInterface && $errors[$component->get_name()] )
                {
                    $errors_array[] = array(
                        'section'=> $section->get_slug(),
                        'message'=> $errors[$component->get_name()]
                    );
                }
            }
        }
        State::set('errors', $errors_array);
    }