Tags:
create new tag
view all tags

Question

I notice that in TWikiFuncDotPm that

throw TWiki::OopsException($web, $topic, undef, 0, [ 'I made a boo-boo' ]);

is recommended. Is TWiki::!OopsException an official part of the API?

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- MeredithLesly - 18 May 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

No, it isn't. But if you are used to exceptions and exception handling, it's the only sensible thing to do. The doc should be changed so it isn't a reccomendation, only an option.

-- CrawfordCurrie - 22 May 2006

Also note that this is NOT the correct syntax in 4.0.1.

Something like this is what actually works:

        throw TWiki::OopsException( 'attention',
                                    def => 'save_error',
                                    web => $web,
                                    topic => $topic,
                                    params => ["param1"] );

-- JadeCravy - 29 May 2006

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-05-29 - JadeCravy
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.