lundi 21 avril 2014

How to cast .NET exception to Java Exception using IKVM?


Vote count:

0




My solutions design is as folows



+--------------------+
| .NET exe | throws .NET Exception
|--------------------|
| IKVM | | <------------auto conversion?
+--------------------+ v
| java jar assembly | java exception
+--------------------+


When .net exe throw an exception, such as System.NotSupportedException into java jar library assembly, java-based assembly expects java exception are thrown while .net library exception is based upon non-java exception.


It works fine if .NET try{}catch{} converts .net exception into ikvm java exception.


But i don't think it is not smart.


Is there any way to convert .NET exceptions to java exceptions gracefully?



asked 55 secs ago

Yone

36





Aucun commentaire:

Enregistrer un commentaire