[NETCONF-41] unwanted exception handling Created: 29/Jun/15 Updated: 15/Mar/19 Resolved: 13/Nov/15 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Shashidhar Shekar | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 3885 |
| Description |
|
public class NetconfMonitoringServiceImpl public synchronized Schemas getSchemas() { catch (final RuntimeException e) { no point in catching n rethrowing if its not being processed ... |
| Comments |
| Comment by Robert Varga [ 13/Nov/15 ] |
|
Move to NETCONFI project. |
| Comment by Robert Varga [ 13/Nov/15 ] |
|
There are two catch clauses: try { return transformSchemas(netconfOperationProvider.getCapabilities()); }catch (final RuntimeException e) { throw e; }catch (final Exception e) { throw new IllegalStateException("Exception while closing", e); }The order is important: it propagates RuntimeExceptions without wrapping, and wraps checked exceptions in an IllegalStateException. |