[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
Platform: All


External issue ID: 3885

 Description   

public class NetconfMonitoringServiceImpl

public synchronized Schemas getSchemas() {
try

{ return transformSchemas(netconfOperationProvider.getCapabilities()); }

catch (final RuntimeException e) {
throw 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.

Generated at Wed Feb 07 20:14:01 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.