text stringlengths 1 330k |
|---|
// this is a programming / environment error |
// throw as unchecked exception |
throw new RuntimeException(ex); |
Of course the downside of this approach is that is more work. The upside is that you have explicitly stated in code which are the "expected" circumstances and which ones should not happen ever. |
share|improve this answer |
add comment |
Yes, the exceptions should be handled, but in Spring design, on higher level then the each DAO method. In fact the design where in every method there is SQLException handling is unclean copy-paste design, and when you change something, you must apply the change in every place. |
There are various demands, and various places where you handle unchecked exceptions. One of these are aspects, where you can for example convert Spring's exceptions to your exceptions (uncatched exceptions need not be declared in method signature, so this convertion is very elegant). In REST method you can add generic ... |
share|improve this answer |
You don't need to handle it in the DAO, you could just declare your DAO interface as throws SQLException (or whatever exception you want your DAOs to raise). – gpeche Jan 15 '12 at 20:05 |
Yes, but still you have to handle it somewhere. And even if you handle it in aspect, still throws declaration stays and you must handle exception you never get... – Łukasz 웃 L ツ Jan 15 '12 at 20:56 |
Well you always have to handle exceptions, except in development. Otherwise your program terminates in a uncontrolled way. – gpeche Jan 15 '12 at 21:55 |
Yes, but you can do it in aspect, or in task dispatcher, or in queue, or anywhere else where the tasks are called. – Łukasz 웃 L ツ Jan 16 '12 at 8:11 |
add comment |
The benefit is not being forced to catch or declare them. |
I'm not convinced that not finding data during user searches is exceptional, particularly at the SQL level. Turning that into a checked exception amounts to using exceptions for generalized flow control. I would consider that an anti-pattern to be avoided; YMMV. |
Many SQL-related errors are code-related; IMO it's better to fail fast--during development. |
share|improve this answer |
add comment |
Your Answer |
Presidential candidates debate marriage for gay couples |
BY admin |
October 15 2004 12:00 AM ET |
During the last of three presidential debates on Wednesday evening, an unprecedented discussion on homosexuality and gay rights highlighted the two candidates' concurring and differing views on the issue. It started when George Bush was asked by moderator Bob Schieffer if he believes homosexuality is a choice. "You kno... |
"But as we respect someone's rights and as we profess tolerance, we shouldn't change, or have to change, our basic views on the sanctity of marriage," Bush continued. "I believe in the sanctity of marriage. I think it's very important that we protect marriage as an institution between a man and a woman. I proposed a co... |
"I'm deeply concerned that judges are making those decisions, and not the citizenry of the United States," Bush continued. "You know, Congress passed a law called DOMA, the Defense of Marriage Act--my opponent was against it--it basically protected states from the action of one state to another. It also defined marriag... |
In his response, John Kerry talked about Vice President Dick Cheney's daughter Mary. "We're all God's children, Bob, and I think if you were to talk to Dick Cheney's daughter, who is a lesbian, she would tell you that she's being who she was, she's being who she was born as. I think if you talk to anybody, it's not a c... |
"The president and I share the belief that marriage is between a man and a woman. I believe that," Kerry continued. "I believe marriage is between a man and a woman. But I also believe that because we are the United States of America, we're a country with a great, unbelievable Constitution, with rights that we afford p... |
Kerry's comment about Mary Cheney drew criticism from a number of conservative sources, including Mary's mother, Lynne. During a debate-watching party in the Pittsburgh suburb of Coraopolis, Lynne Cheney accused the Massachusetts senator of pulling a "cheap and tawdry political trick" for invoking her daughter's sexual... |
In his earlier debate with John Edwards, the vice president expressed no objection when the Democrat brought up his daughter Mary. Edwards expressed "respect for the fact that they're willing to talk about the fact that they have a gay daughter, the fact that they embrace her. It's a wonderful thing." |
In response to Lynne Cheney's rebuke, Human Rights Campaign executive director Cheryl Jacques said, "President Bush missed one more chance to denounce discrimination last night, so it is bewildering that Lynne Cheney instead attacked Senator Kerry. Senator Kerry made clear that gay Americans should have the same basic ... |
Shortly after the debate, the gay political group Log Cabin Republicans issued a statement on Kerry's comments. "Senator Kerry could have made his point about gay and lesbian Americans without mentioning the vice president's daughter," it read. "However, this shouldn't distract us from the fact that President Bush, Kar... |
Tags: World |
Hicksville, New York Jobs Forum |
Get new comments by email |
You can cancel email alerts at anytime. |
Current Discussions (12) - Start a Discussion |
Best companies to work for in Hicksville? |
What companies are fueling growth in Hicksville? Why are they a great employer? |
Up and coming jobs in Hicksville |
What jobs are on the rise in Hicksville? |
What are the best neigborhoods in Hicksville? |
Where is the good life? For families? Singles? |
Best schools in Hicksville? |
Where are the best schools or school districts in Hicksville? |
Weather in Hicksville |
What are the seasons like in Hicksville? How do Hicksville dwellers cope? |
Hicksville culture |
Food, entertainment, shopping, local traditions - where is it all happening in Hicksville? |
Hicksville activities |
What are the opportunities for recreation, vacation, and just plain fun around Hicksville? |
Newcomer's guide to Hicksville? |
What do newcomers need to know to settle in and enjoy Hicksville? Car registration, pet laws, city services, more... |
Commuting in Hicksville |
When, where and how to travel. |
Moving to Hicksville - how did you get here? |
Hicksville causes and charities |
What causes do people in Hicksville care about. Where are the volunteer opportunities? |
Job search in Hicksville? |
What are the best local job boards, job clubs, recruiters and temp agencies available in Hicksville? |
RSS Feed Icon Subscribe to this forum as an RSS feed. |
» Sign in or create an account to start a discussion. |
Rosemary Cabelo uses a computer at a public library to access the Affordable Health Care Act website on Dec. 11, 2013, in San Antonio. |
The Scariest Graph the CBO Released Today |
A new CBO report has partisans up in arms, but anyone can agree the job market isn’t looking great. |
The Congressional Budget Office estimates that Obamacare could mean fewer people searching for jobs. |
Today, while it was telling us that Obamacare could mean fewer workers and a slowing economy would push deficits up, the Congressional Budget Office also put out a report about the labor market's slow recovery (cleverly titled "The Slow Recovery of the Labor Market"). Here is a look at exactly how messed up the labor m... |
[READ: CBO: Deficit to Shrink, Recovery to Slow, Obamacare to Mean Fewer Jobs] |
(Congressional Budget Office) |
It’s not a simple up-and-down plotting of the jobless rate over time, but it displays one crucial point about the job market: It’s just not what it used to be. The chart at left is the Beveridge curve, a plot of the share of unemployed Americans versus how many jobs are open. |
Barring any major economic shifts, the labor market generally travels up and down the curve, but the curve itself does not move. It’s painful when the jobless rate gets higher under these circumstances, but it also tends to mean that demand is simply low for goods and services. |
But as the above curve shows, there was a big shift outward after July 2009 – meaning that even though the current job vacancy numbers are similar to only a few years ago, the unemployment rate is now higher. |
[ALSO: Alongside Income Gap, Internet Gap Remains Wide] |
All sorts of reasons could contribute to this, according to the CBO: The stigma of long-term unemployment, for example, could be keeping some would-be workers out of all those vacancies. Likewise, the long-term unemployed could be losing valuable job skills as they sit idle. In addition, a skills mismatch may be at wor... |
It also could be possible that extensions of jobless benefits helped push the unemployment rate up, the CBO says, as people continued applying for jobs in order to stay in the labor force and continue collecting benefits. However, those effects started tapering off in 2013, as people began exhausting their benefits, ac... |
What it means is that getting the job market back to where it once was will be a matter that involves far more than boosting growth and, therefore, demand. The jobless rate, at 6.7 percent, is roughly 2 full points higher than it was at the end of 2007. According to the CBO, structural factors – things like a broad ski... |
Those structural factors, unfortunately, are tricky to solve. It could mean job training, and it could mean pushing employers to hire the long-term unemployed, as President Barack Obama is attempting to do. But they could take years to solve – the CBO predicts that the problems affecting the long-term unemployed won't ... |
Tea-Fueled Republican Resistance Compels Barack Obama To Keep Running |
In 2012, Paul Ryan declared that the election would “determine” American policy. But in 2013, Republicans aren’t accepting the result, writes, Robert Shrum. |
As President Obama is discovering, election, or more particularly reelection, can be a waning mandate. Yes, he won his top rate tax increases in January—but less because Republicans accepted the verdict of last November than that they feared the blame in November 2014 if they conspicuously shattered the credit-worthine... |
Well, although they wouldn't put it in those words, that is exactly the Republican position: voucherize Medicare, mow down Medicaid, and, no surprise, slash tax rates for the wealthy and corporations to 25 percent. From White House officials to Congressional Democrats to liberal commentators like Rachel Maddow, there h... |
In reality, things don't work out that way—and they certainly aren't now. In fact, the Tea-fueled Republican resistance to Obama's approach is both consistent with history, and dangerously ahistorical. |
First, the consistency: political parties don't surrender core positions just because their presidential nominee finished behind, sometimes far behind, in the electoral college. |
After Richard Nixon carried 49 states in 1972, Democrats continued to press for a definitive end to the Vietnam War—and Congress ultimately defied the impeached and disgraced president's successor Gerald Ford and their mutual secretary of State, Henry Kissinger, by refusing a request for last-minute arms and air cover ... |
The examples here are legion, for both Democratic and Republican presidents, and whether their elections were close calls or landslides. John F. Kennedy ran on Medicare in 1960—it was a central difference between him and Nixon—and then against fierce opposition, lost the bill in the Senate by four votes. In 1994, Bill ... |
Ronald Reagan, another 49-state winner, did secure sweeping tax reform; but it was a Democratic as much as a Republican plan, embodying ideas Ted Kennedy had pursued for years and shaped as much by Democrats like Dick Gephardt and Bill Bradley as by his administration. Reagan achieved comprehensive immigration reform, ... |
Lyndon Johnson, who was first elected to the Senate in 1948 by 87 votes, derisively earning the nickname "Landslide Lyndon," redeemed his electoral status by capturing the highest share of the popular vote in history in the presidential contest of 1964. But he's the exception that proves the rule. He promptly passed Me... |
On a broad span of issues, from economic justice to the rights of women, Hispanics, other minorities, and gays and lesbians, the GOP is paddling against the tide of history. |
So the resistance Obama faces today is not unusual, even if it is unusually bitter. What is fundamentally ahistorical is the GOP's utter unwillingness to compromise—and its willingness to threaten the underpinnings of both government and the economy. Even in the throes of the Watergate scandal, the two parties collabor... |
Newt had learned the lesson of the shutdown. And today’s House Republicans say that they have, too. They've just approved a bill to fund the government until the end of September. The prevailing assumption is that the Senate will remove some of the poison pills that are killing domestic programs—and the final product w... |
A great country shouldn't be making fateful fiscal decisions month by month, but it's better than fiscal collapse. That doesn't obviate the prospect of a gradual, grinding economic slowdown. Aside from the human pain, inflicted not just on federal workers but on the poorest and most vulnerable, the sequester is likely ... |
In the customary dramaturgy of the Beltway, excessive attention has been paid to a sideshow orchestrated by the Washington Post's Bob Woodward —the discredited claim that the president "moved the goalposts" by insisting that revenue be part of an agreement to avert sequestration. But in 2011, the White House made clear... |
What matters far more than this tempest in the media's self-reflective mirror is the Republicans' manic and politically convenient obsession with growth-retarding, job-ravaging austerity. Throughout Obama's first term, they blocked effort after effort to help strained state and local governments and to lift demand acro... |
Now the GOP, impelled by ideology matched to calculation, is trying the same game again. And Republicans aren't deterred, but encouraged by the near-universal consensus—and the nearly universal proof from Europe to Asia and the Americas—that austerity is the road to economic malaise or recession. The obvious aim is to ... |
Bill Clinton signing budget reconciliation measure into law, Newt Gingrich pictured background center, August 5, 1997. (Douglas Graham/Getty) |
I've argued here before that the president in effect has to run for a third term in the midterm campaign. Aside from marshaling the unparalleled competencies of his organization—and I don't care about the tut-tutting of goo-goo groups like Common Cause about his fundraising for this—unilateral disarmament is not a suff... |
On a broad span of issues, from economic justice to the rights of women, Hispanics, other minorities, and gays and lesbians, the GOP is paddling against the tide of history. They will do it less conspicuously now, as quietly as the base will let them. And in the meantime, in the name of a clichéd and miscarried fiscal ... |
The president has reached out, sought out middle ground, and repeatedly been rebuffed. His experience validates JFK's observation that you can't negotiate with those who say: "What's mine is mine and what's yours is negotiable." For the sake of the nation, I wish Obama had some of the luck of Clinton in 1997. So while ... |
Security // Risk Management |
10:38 AM |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.