Title: MagpieRSS::error
Published: April 25, 2014
Last modified: February 24, 2026

---

# MagpieRSS::error( $errormsg,  $lvl = E_USER_WARNING )

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/magpierss/error/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/magpierss/error/?output_format=md#related)

[ Back to top](https://developer.wordpress.org/reference/classes/magpierss/error/?output_format=md#wp--skip-link--target)

## 󠀁[Source](https://developer.wordpress.org/reference/classes/magpierss/error/?output_format=md#source)󠁿

    ```php
    function error( $errormsg, $lvl = E_USER_WARNING ) {
    	if ( MAGPIE_DEBUG ) {
    		wp_trigger_error('', $errormsg, $lvl);
    	} else {
    		error_log( $errormsg, 0);
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rss.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/rss.php#L391)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/rss.php#L391-L397)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/magpierss/error/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_trigger_error()](https://developer.wordpress.org/reference/functions/wp_trigger_error/)`wp-includes/functions.php` |

Generates a user-level error/warning/notice/deprecation message.

  |

| Used by | Description | 
| [MagpieRSS::__construct()](https://developer.wordpress.org/reference/classes/magpierss/__construct/)`wp-includes/rss.php` |

PHP5 constructor.

  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fmagpierss%2Ferror%2F)
before being able to contribute a note or feedback.