Sponsored Content
Full Discussion: __throw
Top Forums Programming __throw Post 302236768 by ranton on Tuesday 16th of September 2008 09:51:42 AM
Old 09-16-2008
Java RE: __throw

__THROW is a macro which is setup by the headers to evaluate to blank in C and throw() in C++. That throw() does is specify the list of types of exceptions that the function may throw. With nothing between the parenthesis, this is a blank list, and means the function declaration is promising to not throw any exceptions at all.

I am sure this is tagged onto library calls for the sake of allowing better performance/optimization when called from C++.
 
Throwable::Error(3pm)					User Contributed Perl Documentation				     Throwable::Error(3pm)

NAME
Throwable::Error - an easy-to-use class for error objects VERSION
version 0.102080 SYNOPSIS
package MyApp::Error; use Moose; extends 'Throwable::Error'; has execution_phase => ( is => 'ro', isa => 'MyApp::Phase', default => 'startup', ); ...and in your app... MyApp::Error->throw("all communications offline"); # or... MyApp::Error->throw({ message => "all communications offline", phase => 'shutdown', }); DESCRIPTION
Throwable::Error is a base class for exceptions that will be thrown to signal errors and abort normal program flow. Throwable::Error is an alternative to Exception::Class, the features of which are largely provided by the Moose object system atop which Throwable::Error is built. Throwable::Error performs the Throwable and StackTrace::Auto roles. That means you can call "throw" on it to create and throw n error object in one call, and that every error object will have a stack trace for its creation. ATTRIBUTES
message This attribute must be defined and must contain a string describing the error condition. This string will be printed at the top of the stack trace when the error is stringified. stack_trace This attribute, provided by StackTrace::Auto, will contain a stack trace object guaranteed to respond to the "as_string" method. For more information about the stack trace and associated behavior, consult the StackTrace::Auto docs. METHODS
as_string This method will provide a string representing the error, containing the error's message followed by the its stack trace. AUTHORS
o Ricardo SIGNES <rjbs@cpan.org> o Florian Ragwitz <rafl@debian.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.10.1 2010-07-27 Throwable::Error(3pm)
All times are GMT -4. The time now is 03:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy