24 Topics

Member Avatar for
Member Avatar for Doogledude123

Is this try catch block enough to ensure the process ran successfully? protected boolean attemptLaunch() { try { System.out.println("Attempting to open '" + name + "'."); //Try to open the Process new ProcessBuilder(path).start(); return true; } catch (IOException e) { System.out.println("Opening failed. Will retry during next Iteration."); return false; } …

Member Avatar for jwenting
0
281
Member Avatar for ahvic4u

[CODE]<html> <style> #playingArea { position: absolute; top: 1; left: 1; border: 5px solid black; width: 750; height: 720; z-index: 2; } #basket { position: absolute; top: 650; left: 228; width: 64; height: 16; } </style> <script type="text/javascript" language="Javascript"> var basket; var basketLeft = 228; function keyListener(e) { e = window.event; …

Member Avatar for Taywin
0
2K
Member Avatar for Reverend Jim

Could you possibly change the chat notification to something a little more eye-catching? I've been on daniweb several times today and never noticed that someone had posted a message the evening before. Changing the text color from white to dull orange just isn't doing it. How about changing the background …

Member Avatar for Dani
0
284
Member Avatar for Bile

-->>Hello,My problem is how will a trigger a php Function based up on Change event of a listbox value. My Page has the Field as those in the screenshot below the code: So when a driver is selected on the list all his/her details should be populated in the remaining …

Member Avatar for Bile
0
2K
Member Avatar for admiri92

Are exceptions standardized in C++? I mean if the rules of exception handling might be changed in the future. i.e: int Funct1(int) throw(); // does it throw an exception?

Member Avatar for mike_2000_17
0
284
Member Avatar for Gerryne

Hi. Our homework is to use try...catch block in our calculator applet. I don't understand why the "catch" does not work. It will always go straight to the "finally". Here's the code: import java.applet.*; import java.awt.*; import java.awt.event.*; import java.awt.Label; import javax.swing.*; public class clsCalculator extends Applet implements ActionListener { …

Member Avatar for stultuske
0
429
Member Avatar for klemme

Hi All, Im trying to learn how to use pdo, and am curious to know how i best can deal with allkind off errors. Lets say there is a typo, or im selecting an non existing row etc etc. In my connection, do I have do set anyting different here: …

Member Avatar for diafol
0
256
Member Avatar for Ancient Dragon

I'm using VS 2012 and coding a try/catch block in an MS Access database project, but VS says OleDbException is not defined (see line 3 in the code). Anyone know why? I got some of this code from [here](http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/c822d48c-fd90-44a1-a186-a15e16966233/), and according to MSDN OleDbException is valid in vb.net Try data_adapter.Update(CType(binding_source.DataSource, …

Member Avatar for Ancient Dragon
0
236
Member Avatar for coolvasu

Hi everybody, i have problem in my php code (it just showing nothing....means no error no results).......can anybody tell me what is wrong with this code.....i'm new to PHP........here is my code <?php try { $config=array( 'DB_USERNAME'=>'root', 'DB_PASSWORD'=>'' ); $conn=new PDO('mysql:host=localhost;dbname=scc',$config['DB_USERNAME'],$config['DB_PASSWORD']); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo rand_id(); } catch(Exception $e) { echo …

Member Avatar for coolvasu
0
339
Member Avatar for ProgramGuy

Hey everyone! Happy New Year! I am trying to hone my programming skills by writing simple applications. I created a very simple currency converter program (hard-coded exchange rates....so nothing special). I first created it as a console app, and then in WPF. Anyway, I ran into an issue with the …

Member Avatar for ProgramGuy
0
733
Member Avatar for Nutster

I am pretty new to programming in VB.Net, but I have been programming in other languages for a couple of decades now, including VB5/6 and C++. When I am using a **Try** - **Catch** block to handle exceptions, what is the point of a **Finally** section? Wouldn't it be just …

Member Avatar for Reverend Jim
0
291
Member Avatar for mr.python

Hi I have this code [CODE=php]<iframe src="http://playerplus.co.nu/ipp.php"> </iframe> [/CODE] can i catch the result of the page in some variable or but it in some text without get it direct from [url]http://playerplus.co.nu/ipp.php[/url]

Member Avatar for Szabi Zsoldos
0
90
Member Avatar for 3nrichedd

hello, I am lik 98% done with this assignment where the user enters a number, and then it will output if you guessed the right number, or if you have any matching digits, so for example, the if the random number is 24 and the user inputs 20 it should …

Member Avatar for poojavb
0
222
Member Avatar for Hypnos_16

I'm trying to write a program that allows a user controlled character to move around a maze. That problem i'm having is having it determine when it runs into a wall. I have a code done up to handle it. I'm just running into some errors i need help cleaning …

Member Avatar for NormR1
0
268
Member Avatar for Virangya

hi, i have this jquery page that is included in an html file and in that file i have a function with .dialog() i want to open a normal pop up if this dialog doesn't work.. i was wondering how ca i do this... will try() catch() work on this..? …

Member Avatar for Airshow
0
191
Member Avatar for itsgrace

I'm creating a web-based mail client from scratch using PHP IMAP library. What I need to implement right now is fetch the error and display it in a fancy way(ex. pop up in the view when error occured). How am i going to do this? This is a sample of …

0
101
Member Avatar for rom.

Hi all. I'm trying to move someone else's app onto a different server (and debug it in the process). Among the onslaught of bugs to squash, theres one I just cant get my head around... I get a parse error on try-catch, and I have no idea why. I've isolated …

Member Avatar for rom.
0
336
Member Avatar for chepelucho

Hello I have this.. I have a Scrip with name [B]MiScript.jsp[/B] and code.... [CODE]<%@ include file="Func.jsp" %> <jsp:include page="Func.jsp"/> <% String Mipath = "C:\\"; String Mifile = "File.Ext"; if(mifuncion(Mipath , Mifile )) { out.println("OK!!!"); } else{ out.println("ERROR!"); } %>[/CODE] And I have the other Script [B]Func.jsp[/B] with a Method.... [CODE]<%@ …

Member Avatar for parry_kulk
0
294
Member Avatar for Xufyan

Our teacher really sux, he just wrote this down on the board but didn't explain the program :(...after a lot of search i finally understand what is try and catch but what is the meaning of [iCODE]byte b=new byte[255];[/iCODE] in this program ? and why the program is not working …

Member Avatar for JamesCherrill
0
161
Member Avatar for Sunshineserene

Hi, I need to do a file read and extract all the numbers in the text file to be used in my java program. However, I'm having some problem with the try and catch statement. Must the try and catch statement be in the main loop only? Can't I used …

Member Avatar for Sunshineserene
0
179
Member Avatar for Mapper99

I recently implemented a try catch routine to get past an error I could not fix. Unfortunately, the page loads completely in Chrome, Safari and IE, but halts in Firefox. Any idea why? Here is the URL to the page: [url]http://laudontech.com/tools/Edit4.HTML[/url]

Member Avatar for tscman
0
136
Member Avatar for fire_

Hello. I'm writing program wich reads from file line by line and then rewrites everything to other file. This is simplifyied part of code: [CODE]for (int i=0; i<=5;) { getline (file1, str1); /* file1 is file from wich i read and str1 is string*/ file << str1; }[/CODE] No i'm …

Member Avatar for Ancient Dragon
0
271
Member Avatar for hgbreton

Hi. I've got to write some code to get data from an XML document and turn it into C# objects. Problem is that the XML document will not always have the same nodes, since it is produced from a web form that people have filled in varying amounts of (which …

Member Avatar for hgbreton
0
153
Member Avatar for moods125

[[CODE]#include <iostream> #include <string> using namespace std; class digits { }; class numOutofRange { }; int string_to_int(string s) throw(digits, numOutofRange); int main() { int histogram[10]; int total; int currentNumber = 0; string s; for(int i=0; i < 10; i++) { histogram[i] = 0; } cout <<"How many numbers do you …

Member Avatar for moods125
0
155

The End.