473,498 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unreported exception ,exception to be caught r declared ,error is this

public static boolean hasRole(long userId, String role) {

try {
List<Role> roles = RoleServiceUtil.getUserRoles(userId);

for (Role tmpRole : roles) {

if (tmpRole.getName().equalsIgnoreCase(role)) {
return true;
}
}

} catch (PortalException e) {

e.printStackTrace();

}

catch (SystemException e) {

e.printStackTrace();

} catch (RemoteException e) {

e.printStackTrace();
}

return false;

}

}
Oct 7 '10 #1
2 1614
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Sorry. I did not understood your question. Can you elaborate the question and what is expected out of this code?

Regards
Dheeraj Joshi
Oct 7 '10 #2
pbrockway2
151 Recognized Expert New Member
It is also a good idea to copy and post the entire error message. And indicate which lines of your code it is referring to.
Oct 7 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1351
by: Chumley the Walrus | last post by:
I'm trying to use a helper function in code behind inside a datalist control . Below is my page directive: <%@ Page Language="VB" Codebehind="datehelp.aspx.vb" debug="true"%> ...then i am...
5
27960
by: William | last post by:
In Peer.h, I have: class Peer { // ... }; In Overseer.h, I have: #include "Peer.h" #include <vector>
3
1784
by: Chris Baldwin | last post by:
Hello, I'm having a problem with a mixed managed/unmanaged DLL. When I attempt to reference "Exception" in my VB.NET code, it conflicts with some other "exception" that gets somehow gets into...
2
1470
by: darrel | last post by:
I'm using a repeater control. I need the itemtemplate to be slightly different depending on the data, so I thought I'd use a select/case statement. Unfortunately, I'm getting a 'Container' is not...
3
1650
by: DC Gringo | last post by:
I've got a web user control (a) inside a web user control (b) inside a webform (c). I need the webform to set a label control text value inside the inner of the two web user control. Inside my...
14
8988
by: Darren L. Weber | last post by:
I am trying to compile a utility to create .avi files. See http://cpbotha.net/im2avi I'm working on Debian etch (a mix of testing/unstable). dweber@dnlweber:~/im2avi-0.4$ g++ --version g++...
4
2316
by: Krice | last post by:
I get the following error: editarea.cpp: In member function `int Edit_Area::Mouse_Draw(int, int, unsigned char)': `g_undo' was not declared in this scope The problem is that g_undo is there....
2
6326
by: Tim H | last post by:
help?!? #include <boost/shared_ptr.hpp> class pp_dirent {}; class pp_scope: public pp_dirent {}; int main() { boost::shared_ptr<pp_direntp1(new pp_scope()); boost::shared_ptr<pp_scopep2 =...
3
16508
by: psroga | last post by:
Can anyone look at this code and let me know why pthread_mutex_unlock and pthread_mutex_lock are giving me the "phtread_mutex_unlock" was not defined in this scope error. I am compiling the code...
4
1482
by: =?Utf-8?B?Vmlj?= | last post by:
Hi, I am getting "Name objDR is not declared" error. I am declaring objDR in the if then else section. How do I over come this issue. Thanks for the help. Dim objDS As New...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.