using the install command within the shell with either an invalid file URL or a non-existent file throws BundleException and FileNotFoundException.
Handle exception gracefully?
(: install file:///asdasdf
Error occurred while executing command:
Cannot retrieve bundle from file:///asdasdf
org.osgi.framework.BundleException: Cannot retrieve bundle from file:///asdasdf
at ch.ethz.iks.concierge.framework.Framework.installNewBundle(Framework.java:1054)
at ch.ethz.iks.concierge.framework.Framework$BundleContextImpl.installBundle(Framework.java:1836)
at com.buglabs.osgi.shell.commands.concierge.InstallCommand.execute(InstallCommand.java:36)
at com.buglabs.osgi.shell.ConsoleListener.run(ConsoleListener.java:116)
java.io.FileNotFoundException: /asdasdf (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at ch.ethz.iks.concierge.framework.Framework.installNewBundle(Framework.java:1052)
at ch.ethz.iks.concierge.framework.Framework$BundleContextImpl.installBundle(Framework.java:1836)
at com.buglabs.osgi.shell.commands.concierge.InstallCommand.execute(InstallCommand.java:36)
at com.buglabs.osgi.shell.ConsoleListener.run(ConsoleListener.java:116)
Logged In: YES
user_id=1368628
Originator: NO
Yes, we should do this. I will keep this in mind for the next release.
Thanks,
Jan.