Skip to Main Content

Java SE (Java Platform, Standard Edition)

RuntimeException

EdChouaffeMar 25 2011 — edited Mar 25 2011
Hi Guys.

Is there any good reasons why an RuntimeException is not thrown although it should?
Look at the following code snippset:
Note: colConstraints is a HashMap object.
Set<String> newValueSet = .... (here is the object initialized with some values)
for (String key : newValuesSet) {
				if (colConstraints.containsKey(key)) {
					System.out.println(colConstraints + "  " + key);
					throw new RuntimeException(
							"SQLQueryBuilder.UpdateQuery: Misplacement " + key
									+ " cannot be a primary or foreign key");
				}
			}
I wonder why I dont get any error thrown even though there are cases where key is contained within colConstraints.
Best regrads.

Edmond
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2011
Added on Mar 25 2011
1 comment
109 views