Files
@ 352056907cfd
Branch filter:
Location: kallithea/init.d/supervisord.conf
352056907cfd
2.6 KiB
text/plain
validators: introduce InvalidCloneUriException instead of throwing bare Exceptions for invalid clone URIs
When adding a new repository with a remote clone URI, the URI will be validated
in some way. In case of errors, it would raise 'Exception' to report invalid
URLs. Code calling the validation would thus have to catch 'Exception', which
means that _any_ exception would cause the URI to be found invalid.
Instead, create a special exception type intended to be used for all exceptions
we know can occur during normal URL validation.
When adding a new repository with a remote clone URI, the URI will be validated
in some way. In case of errors, it would raise 'Exception' to report invalid
URLs. Code calling the validation would thus have to catch 'Exception', which
means that _any_ exception would cause the URI to be found invalid.
Instead, create a special exception type intended to be used for all exceptions
we know can occur during normal URL validation.