API15

JError/raiseWarning: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 53: Line 53:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=raiseWarning
  category=raiseWarning
  category=JError
  category=JError
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:35, 25 March 2017

Description

Wrapper method for the raise() method with predefined error level of E_WARNING and backtrace set to false.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

& raiseWarning($code, $msg, $info=null)
Parameter Name Default Value Description
$code $code The application-internal error code for this error
$msg $msg The error message, which may also be shown the user if need be.
$info null $info Optional: Additional error information (usually only developer-relevant information that the user should never see, like a database DSN).

Returns

object $error The configured object

Defined in

libraries/joomla/error/error.php

Importing

jimport( 'joomla.error.error' );

Source Body

function & raiseWarning($code, $msg, $info = null)
{
        $reference = & JError::raise(E_WARNING, $code, $msg, $info);
        return $reference;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples