Don't use hard coded values for border colors, etc. Use style instead
Looks like we're not catching the correct exception type which may happen here