That makes perfect sense for regular users. I’ll look into fixing the error messages for storage provisioning (which is only for root admins).
Unless there are any objections, I’ll also override ServerApiException’s getMessage() and getLocalizedMessage() to return getDescription(). -Chris -- Chris Suich chris.su...@netapp.com NetApp Software Engineer Data Center Platforms – Cloud Solutions Citrix, Cisco & Red Hat On Nov 13, 2013, at 1:13 PM, Alena Prokharchyk <alena.prokharc...@citrix.com> wrote: > Note that regular gets generic messages appended with "…please contact your > system administrator" when server side exception happens. Thats by design as > regular user doesn't need to know the specifics, all he needs to do – let the > admin know, and the admin will do the further debugging/fixing. > > While admin should get the message explaining the root cause of the error. > Its a known problem that in lots of the cases CS lacks the details, and it > should get fixed. But again, for Root admin only. > > -Alena. > > From: Mike Tutkowski > <mike.tutkow...@solidfire.com<mailto:mike.tutkow...@solidfire.com>> > Date: Wednesday, November 13, 2013 9:46 AM > To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" > <dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>> > Cc: Alena Prokharchyk > <alena.prokharc...@citrix.com<mailto:alena.prokharc...@citrix.com>>, Edison > Su <edison...@citrix.com<mailto:edison...@citrix.com>> > Subject: Re: Question regarding ServerApiException > > Hey Chris, > > I think you've got a great point here. It would be nice if > ServerApiException's getMessage() method were overridden to return > getMessage(). > > I've noticed on occasion, as well, that exceptions I throw out of my plug-in > get caught elsewhere and a more generic (somewhat useless) error message is > displayed instead of the text I provided. > > Talk to you later > > > On Wed, Nov 13, 2013 at 7:28 AM, SuichII, Christopher > <chris.su...@netapp.com<mailto:chris.su...@netapp.com>> wrote: > Alena & Edison (or others), > > Is there a reason that ServerApiException has a getDescription() method > rather than using getMessage() like all other exceptions? This causes > problems in places where you’d like to treat all exceptions generically and > be able to simply call getMessage(), but ServerApiException always returns > null. > > For example, I’m trying to fix an issue with StorageManagerImpl, where all > errors provisioning a new storage pool simply return “Failed to add data > store” without any actual meaningful error message. In general, we could do > something like “Failed to add data store: “+e.getMessage(), however, that > won’t work for ServerApiExceptions and so they would need to be handled > separately from regular exceptions. One thought I had would be to override > ServerApiException’s getMessage() and just return the description. > > While were on the topic, is there a reason why we shouldn’t update error > messages like “Failed to add data store” to include the exception’s message? > It would be very beneficial for plugins and storage vendors to be able to > return meaningful error messages from failed operations. > > -Chris > -- > Chris Suich > chris.su...@netapp.com<mailto:chris.su...@netapp.com> > NetApp Software Engineer > Data Center Platforms – Cloud Solutions > Citrix, Cisco & Red Hat > > > > > -- > Mike Tutkowski > Senior CloudStack Developer, SolidFire Inc. > e: mike.tutkow...@solidfire.com<mailto:mike.tutkow...@solidfire.com> > o: 303.746.7302 > Advancing the way the world uses the > cloud<http://solidfire.com/solution/overview/?video=play>™