Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
throw
- Page 1
Re: throw() after function id
Programming
Software Development
15 Years Ago
by mrnutty
"void fun()
throw
();" That declaration tells compiler that this function , fun(), won't
throw
any exception. Similarly : void fun()
throw
(myException& m); Tells compiler and user that this function could
throw
a exception shown.
throw exception
Programming
Software Development
16 Years Ago
by Tbusuk
…; } return super.handleEvent(event); } }[/code] where must i put the
throw
Exception,if i haven't had the file saver.txt????
Re: throw exception
Programming
Software Development
16 Years Ago
by ~s.o.s~
> where must i put the
throw
Exception,if i haven't had the file saver.txt???? If you don't have ``saver.txt'', it will automatically be created given that sufficient privileges are available.
throw() after function id
Programming
Software Development
15 Years Ago
by atch
Hi, I've just came across declaration of this form: [code=c++] void fun()
throw
(); [/code] Could anyone explain what is the pourpose of this and maybe someone knows good book with thorough explanaition on this subject. Thank you
Throw something on the next poster(^.^)
Community Center
Geeks' Lounge
15 Years Ago
by ahihihi...
… on the next poster.. e.g. : poster1 : " I will
throw
a frog to the next poster" poster2 : *kills the…
Re: Throw something on the next poster(^.^)
Community Center
Geeks' Lounge
14 Years Ago
by maydhyam
i will tear the stuff toy and
throw
it in the garbage... tea cup
Re: What is the best way to throw exception?
Programming
Software Development
14 Years Ago
by Narue
Throw
the object and catch by reference or const reference. There's no need for dynamic allocation. Your second example is conventional.
Re: Throw a few pennies my way for a good cause
Community Center
Geeks' Lounge
17 Years Ago
by Rashakil Fol
Cancer research is the best way to
throw
your money away since the Church stopped selling indulgences.
Re: Throw a few pennies my way for a good cause
Community Center
Geeks' Lounge
17 Years Ago
by jbennet
[quote=Rashakil Fol;382447]Cancer research is the best way to
throw
your money away since the Church stopped selling indulgences.[/quote] i resent that comment. Cancer research also offer support to people affected and thier families as well as and drugs to families who cant afford it.
Try, Catch, and Throw issue
Programming
Software Development
13 Years Ago
by lightdshadows
… an invalid value for the day, then the program should
throw
and catch an invalidDay object. Similar conventions for the invalid…
Try Throw and Catch with New
Programming
7 Years Ago
by Thomas_36
… string * files = new string[dirsize]; code; if (something bad happens)
throw
("error"); more code; delete[] files; return 1; } // …command here, as: if (something bad happens) { delete[] files;
throw
("error"); } But, doing it this way would seem…
Re: exception handling and throw clause
Programming
Software Development
11 Years Ago
by ~s.o.s~
…;, call it "throws" clause. You use `
throw
` when you want to *
throw
* a new exception i.e. create an actual…of knowing all the possible exceptions a given method can
throw
except for diving deep into the source code. For e….g. a lot of standard library methods can
throw
a `NullPointerException` if presented with a `null` input but don…
Re: exception handling and throw clause
Programming
Software Development
11 Years Ago
by ~s.o.s~
… is a *possibility* that the method `quotient` might
throw
an exception. When a method has a `throws` clause… the method consumer/user that `intDivide` *can*
throw
an exception. Notice that all this is orthogonal to…` which is a *checked* exception. With methods that
throw
checked exceptions, the caller should either *handle* the exception…
Re: Try, Catch, and Throw issue
Programming
Software Development
13 Years Ago
by Banfa
… standard out. The method to read from standard in would
throw
your exceptions. You can then write a main that instantiates…
Re: exception handling and throw clause
Programming
Software Development
11 Years Ago
by Violet_82
…(in the code posted only the quotient method has a
throw
clause), but then again, nextInt() is a method too…exception, it had to be thrown by something, hence the
throw
clause, but again, as said before not everything seems …to be having this
throw
clause...so although your link provided some interesting insights I…
Re: Try Throw and Catch with New
Programming
7 Years Ago
by Coller
… new to declare an array. Allocating memory via `new` can
throw
a `std::bad_alloc` when there isn't enough memory to…
Re: exception handling and throw clause
Programming
Software Development
11 Years Ago
by Violet_82
…/states/informs the method consumer/user that intDivide can
throw
an exception.Because ArithmeticException is an uncheked exception. Yes… have provided. So I appreciate the `nextInt()` can
throw
3 different exceptions and I infer that because of that… method) we don't need to use an explicit
throw
clause?. I wonder though, what would happen if we…
Re: exception handling and throw clause
Programming
Software Development
11 Years Ago
by JamesCherrill
… will see that all three exceptions that nextInt may
throw
extend RuntimeException and are therefore unchecked. The definition of…quot;throws" clause; the three exceptions it can
throw
are just documented in the JavaDoc to be helpful. There…method signature that lets you know that method may
throw
a checked exception which you will have to deal…
Is it possible to throw more than one exceptions at a time?
Programming
Software Development
14 Years Ago
by damirin
…f.Message); } If I run the program, it will only
throw
an exception to tell that head tag is unclosed. However…head(i.e. /head), then the exception will now only
throw
regarding xml tag. Is there a way to scan the…without throwing errors first, at the end of the scan,
throw
both exceptions to user at the same time?
Re: how to throw an exception
Programming
Software Development
14 Years Ago
by Zinderin
… the class working but i cant figure out how to
throw
the exception any help would be appreciated.[/QUOTE] Do you… what they entered? Assuming you really don't want to
throw
an exception ... you would want to a test at the… data) ... and if its above your 10 cents a page,
throw
up a messagebox and let the user respond. If they…
Try - Catch - Throw question
Programming
Software Development
14 Years Ago
by pandaEater
…[/I], to return a reference to the top element or
throw
an error if the heap is empty. I've never… used try, catch, or
throw
statements before so I'm having trouble getting it to… Working { try{ if(mySize > 0) return a[0]; else
throw
"Heap is empty!"; }catch(char *str){ cout <…
Re: Try - Catch - Throw question
Programming
Software Development
14 Years Ago
by thelamb
Why do you catch in this function, immediately after you
throw
? If you remove the try catch in this function, you …; "\n"; } [/code] I find it personally 'dirty' to
throw
a bare char*, I always create an Exception class which… to: [code=cpp] catch( const char* str ) { cout << ...;
throw
str; } [/code]
What difference between these try...catch..throw?HELP
Programming
Software Development
14 Years Ago
by jcfans
…] [B]Example 2[/B] [code] try { } catch(SQLException sqlex) { } catch {
throw
; } [/code] [B]Example 3[/B] [code] try { } catch(Exception ex…) {
throw
ex; } [/code] Can anyone tell me the difference between these …
What is the best way to throw exception?
Programming
Software Development
14 Years Ago
by Hand
If I want to
throw
an instance of a class, where should I alloc …the exception object? Should I use heap: try{
throw
new Exception("An error was found"); } catch(Exception…n"; delete except; } or should not use heap: try{
throw
Exception("An error was found"); } catch(Exception&…
C++ newbie question: error handling--try, throw, catch
Programming
Software Development
14 Years Ago
by Annettest
…my reading, I understand that the "try,
throw
, catch" method is preferable to dealing with …generally, is it overkill to use try, catch,
throw
for something this simple (I would like to improve …."; else cout << "Calculation failed.";
throw
calcError; } catch (const int calcError) { cerr <<…
Namespace/Exception, throw and catch Logic_error
Programming
Software Development
12 Years Ago
by chris.vargas.773
… program that has to
throw
a logic_error and then catch …public exception { const char * what () const
throw
() { return "CS50 Exception"; } }; …int main() { try {
throw
MyException(); } catch(MyException& e) { …
exception handling and throw clause
Programming
Software Development
11 Years Ago
by Violet_82
…main } // end class DivideByZeroWithExceptionHandling So, my question is with the
throw
clause: in line 10 the method quotient throws an exception… denominator: " ); int denominator = scanner.nextInt(); do? Shouldn't they
throw
an `inputMismatchException` the same way `quotient()` throws its `ArithmeticException`? Or…
Re: exception handling and throw clause
Programming
Software Development
11 Years Ago
by Violet_82
…; and not "method". When I say the "
throw
clause" I mean something like public int intDivide(int… for that. When I wondered whether `nextInt()` could have a
throw
(clause?) I did so only so that I could have… like "Oh ok, so `nextInt()` can't have a
throw
clause the same way as the `intDivide()` method can"…
standalone *.jar exec will not throw execeptions
Programming
Software Development
11 Years Ago
by cisumma
…on the thumb drive. It will not
throw
any of my exceptions: exeception example to….getBundle(RESOURCES); } catch (MissingResourceException x) { log(x);
throw
new InternalError(x.getMessage()); } } return resources; } public …
WCF How to Throw FaultException In Duplex RoutingService MessageInspector?
Programming
Software Development
10 Years Ago
by Alaa_7
…Full Duplex Services. The problem is I want to
throw
FaultException in the MessageInspector of the RoutingService at the …request, System.ServiceModel.IClientChannel channel, System.ServiceModel.InstanceContext instanceContext) {
throw
new FaultException("this is inspect error!"); } public …
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC