Handling errors

Catch phrase should never be empty. In this case we at least can print out an message to be used for debugging.
Changed naming of secSetSupport method to getSrcSetSupport

All the names of method should be get\set or predicate. This is naming change that should not affect functionality.
Changed long list of 'else if' to conditional logic

Although some will call it a hack, it is a valid ECMA script way to insert conditional logic to switch case. The switch case here is replacing long list of else - if. While it does not change the functional value, it is improving the code formation and readability.