JError is deprecated what should we use instead

For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
enav
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 125
Joined: Thu Mar 24, 2011 4:40 pm
Location: Venezuela, Zulia, Maracaibo

JError is deprecated what should we use instead

Post by enav » Tue Oct 11, 2011 4:06 pm

Im creating a demo about the joomla API and just found that the class JError is deprecated and heart that this class will be dropped at 12.1

What should we use instead?

the only information i fond is here
https://github.com/joomla/joomla-platform/issues/246
-= I believe that science is the engine of prosperity =- M.K.

RedEye
Joomla! Ace
Joomla! Ace
Posts: 1460
Joined: Sat Jan 21, 2006 8:42 pm

Re: JError is deprecated what should we use instead

Post by RedEye » Wed Oct 12, 2011 9:37 am

use PHP Exception
yeah it will be dropped, but that will take a while, not before J!3.0 I guess

roelandae
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Dec 17, 2011 1:02 am

Re: JError is deprecated what should we use instead

Post by roelandae » Sat Feb 04, 2012 11:00 am

It would be nice though to have some examples of how to use the php exception.
It is much harder now to find all functions that have been deprecated. The logs are filled with deprecated messages for the error class, which is not too helpful.

alwarren
Joomla! Guru
Joomla! Guru
Posts: 527
Joined: Fri Aug 19, 2005 9:27 am

Re: JError is deprecated what should we use instead

Post by alwarren » Sat Feb 04, 2012 3:44 pm

It's used over 900 times in the core. My guess is they want to do away with the pat-based code. Surely they'll come up with an alternative.
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW

enav
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 125
Joined: Thu Mar 24, 2011 4:40 pm
Location: Venezuela, Zulia, Maracaibo

Re: JError is deprecated what should we use instead

Post by enav » Sat Feb 04, 2012 4:03 pm

If you guys use ana IDE for developement, for example "Eclipse IDE" it just change the color of deprecated functions and show the respective message located on the function comments, you can also press control + click over the function anme to opent its code and see the deprecation message
-= I believe that science is the engine of prosperity =- M.K.

realityking
Joomla! Explorer
Joomla! Explorer
Posts: 428
Joined: Fri May 21, 2010 11:43 am
Location: Aachen, Germany
Contact:

Re: JError is deprecated what should we use instead

Post by realityking » Tue Feb 14, 2012 12:59 pm

While JError is deprecated we're not gonna be able to get rid of it too soon.

Stuff that should be logged and not output to the user should use JLog. For anything output to the user you're pretty much stuck with JError for now.

roelandae
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Dec 17, 2011 1:02 am

Re: JError is deprecated what should we use instead

Post by roelandae » Tue Feb 14, 2012 3:43 pm

Thank you for your reply!
I am still trying to get my head around it, but I'll figure it out.


Locked

Return to “Joomla! 2.5 Coding”