How can I find which exception(s) maybe raised by RAVENDB methods? - exception

I’m newbie to RAVENDB. How can I find which exception(s) maybe raised by RAVENDB methods? I’ve searched the online documentation and “Inside RAVENDB Book” without any success.

You can catch the RavenException base class.
Here you can found all of the possible exceptions:
https://github.com/ravendb/ravendb/tree/v4.0/src/Raven.Client/Exceptions

Related

JAX-WS exception handling - best way

I'm a bit confused...
I have a webapp exposing soap webservices.
Now I need my ws's clients to get exception my ws methods are generating (custom exceptions and generic exceptions like Hibernate Exception and so on).
I read a lot but I can't figure out a good solution for... can you please indicate me the best way for this?

.NET WebApi jsonapi.org support

Does anyone know if there is a media formatter out there to support the jsonapi.org spec (application/vnd.api+json).
If not has anyone started (or looking at starting) a project to implement this?
For the record, as of today the answer seems to be no. Best I could find was this guy: http://www.emadibrahim.com/2014/04/09/emberjs-and-asp-net-web-api-and-json-serialization/ and that only tackles a tiny part of the problem.
I've been trying this for a while…unfortunately I tried to make something that was really smart and would automagically handle a data model from Entity Framework with almost no work. I was getting close to thinking about releasing it...and then I found out they changed a bunch of stuff in EF 6 (all models are supposed to be POCOs and the context is now a DbContext instead of an ObjectContext) and I'm probably going to have to essentially start over…which is why I started looking again to see if someone else was doing it and found your question.
Let me know if you're still looking for this, and I'll keep you updated.
UPDATE
I've just published a codeplex project that aims to provide exactly what I've described above. It's called JSONAPI.NET and while it's very early, it already does quite a bit. Documentation is sparse, and I don't have NuGet packages yet…but take a look everyone and see if it's useful for you. Feedback is encouraged! You can contact me from the project page in the link.

Check Unhandled Exception .NET 4

I would know what are the Exception that i didnt handle , even if doesn't throw any exception at the moment, in my Winform Program.
Is there a way to do with .Net 4?
I already made some research about this, but all software that i found doesnt support .NET4.
Update: I need a way to know Which are the Exception that i Didnt Handle. Just like Exception-Hunter but it doesnt support .NET 4 more.
Thanks
Edit: Updated Question
Unfortunately, there is no sure way do what you are asking, unless you never call any third-party code, including .NET framework methods. Unlike Java, .NET has no concept of "checked" exceptions. So, the only way to know with 100% certainty what exceptions a given piece of code can throw is to read the code.

Cant build project after installing jdk 7

After installing jdk 7 and switching java platform for my project in ide i get this when im trying to build project.
warning: [options] bootstrap class path not set in conjunction with -source 1.6
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.NoSuchMethodError: com.sun.tools.javac.util.Name$Table.instance(Lcom/sun/tools/javac/util/Context;)Lcom/sun/tools/javac/util/Name$Table;
at uk.org.retep.util.javac.JavacUtils.<init>(JavacUtils.java:128)
at uk.org.retep.util.annotation.AnnotationScannerProcessor.process(AnnotationScannerProcessor.java:76)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1106)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:419)
at com.sun.tools.javac.main.Main.compile(Main.java:333)
at com.sun.tools.javac.main.Main.compile(Main.java:324)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)
I know that sun switched some apis or something, but ide doesnt tell me whats wrong exactly. Thanks in advance.
You should really share your code that's causing the exception, but the exception indicates that you're using an internal Java API (any class contained in the com.sun packages). You shouldn't be using those APIs directly, as they're considered private implementations and subject to change. As those APIs are private, it isn't as simple as looking for the Javadoc to see what methods are available, but suffice it to say that the method you're calling doesn't exist. You have a few options:
If you're calling this method directly, you need to refactor. You should look for ways to accomplish the same work using public APIs.
If this happens after calling a library method, you should file a bug with the library maintainer informing them about the error and the risks of using the com.sun APIs.
If this happens after calling a public Java API (anything in the java or javax packages) then You should file a bug report with Oracle. This one seems unlikely though.
Also, if you share your code, we may be able to better help you.
[edit]
Further, see this page for more information about why you shouldn't use classes in the com.sun packages.

What are alternatives to JVM exceptions for reporting and handling errors in clojure code?

Background
The book The Joy of Clojure explains how JVM exceptions are a closed system and suggests that there may be better alternatives for reporting and handling errors in clojure. From my experience, the common lisp condition system seems ideal, however, I am not restricting answers to this paradigm. From what I've researched there are conditions (Gilardi) http://clojure.github.com/clojure-contrib/condition-api.html , error-kit (Chouser) http://richhickey.github.com/clojure-contrib/error-kit-api.html, and handler (Weiss) https://gist.github.com/745223, however there does not appear to be a clear winner among these implementations and I feel more information on topic would be useful.
How have existing alternatives been successfully used in projects? I'm looking for examples to emulate.
How do these alternative systems overcome limitations with the JVM exception system?
What are the future directions or what are experimental alternatives on the horizon and what they entail?
FYI, this is being discussed in clojure-dev. Ideas collecting here and thread here.
Many years have passed since the question was asked, but I think the topic is still relevant. I have been working on Promenade (see documentation) that can express error as data and provides elegant error handling and control flow. There are also other projects (mentioned on Promenade README) trying to address the same issue.