|
-
Jul 14th, 2004, 01:23 PM
#1
Thread Starter
Frenzied Member
Code should throw exception(?) but doesn't
Need some help understanding why the following code does not throw an exception.
PHP Code:
// Update the table.
DataTable dtUnitsCurrentOfficers = dtc["Units_Current_Officers"];
newRow = dtUnitsCurrentOfficers.NewRow(); // No exception here
newRow["Unit_Guid"] = unitGuid;
newRow["Officer_Guid"] = officerGuid;
dtUnitsCurrentOfficers.Rows.Add(newRow);
return true;
dtc is a DataTableCollection, and the table "Units_Current_Officers" does not exist in it. I would think that the next line of code, where I try to get a new row, would throw an exception because at this point dtUnitsCurrentOfficers is an undefined value.
To my dismay, no error, and the app continues, even though the rest of the code in that method does not get executed.
Any help appreciated,
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|