@@ -279,10 +279,11 @@ export class HttpResourceAccessor implements ResourceAccessor {
279279 if ( location . isPresent ( ) ) {
280280 try {
281281 url = new URL ( location . get ( ) ) ;
282- } catch ( ex ) {
283- if ( ex instanceof MalformedURLException ) {
282+ } catch ( e ) {
283+ if ( e instanceof MalformedURLException ) {
284284 throw new ShapeTreeException ( 500 , "Retrieving <" + url + "> yielded a Location header \"" + location . get ( ) + "\" which doesn't parse as a URL: " + e . getMessage ( ) ) ;
285- }
285+ } }
286+
286287 }
287288 // Determine whether the resource exists based on the response. Even if the resource
288289 // doesn't exist, additional context and processing is done to provide the appropriate
@@ -354,7 +355,8 @@ export class HttpResourceAccessor implements ResourceAccessor {
354355 } catch ( ex ) {
355356 if ( ex instanceof Exception ) {
356357 throw new ShapeTreeException ( 500 , ex . getMessage ( ) ) ;
357- }
358+ } }
359+
358360 }
359361
360362 /**
@@ -453,10 +455,11 @@ export class HttpResourceAccessor implements ResourceAccessor {
453455 let managerUrlString : string = optManagerString . get ( ) ;
454456 try {
455457 return Optional . of ( new URL ( url , managerUrlString ) ) ;
456- } catch ( ex ) {
457- if ( ex instanceof MalformedURLException ) {
458+ } catch ( e ) {
459+ if ( e instanceof MalformedURLException ) {
458460 throw new ShapeTreeException ( 500 , "Malformed relative URL <" + managerUrlString + "> (resolved from <" + url + ">)" ) ;
459- }
461+ } }
462+
460463 }
461464
462465 /**
@@ -482,10 +485,11 @@ export class HttpResourceAccessor implements ResourceAccessor {
482485 }
483486 try {
484487 managedResourceUrl = new URL ( managerUrl , managedUrlString ) ;
485- } catch ( ex ) {
486- if ( ex instanceof MalformedURLException ) {
488+ } catch ( e ) {
489+ if ( e instanceof MalformedURLException ) {
487490 throw new ShapeTreeException ( 500 , "Can't calculate managed resource for shape tree manager <" + managerUrl + ">" ) ;
488- }
491+ } }
492+
489493 return managedResourceUrl ;
490494 }
491495
0 commit comments