Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
245 stars 50 forks source link

Avoid blindly throwing exceptions #288

Closed johnbillion closed 9 years ago

johnbillion commented 9 years ago

See #218.

bbl_get_new_term_translation_url () and Babble_Taxonomies::get_new_term_translation_url() now return a WP_Error object rather than throwing an exception (and the term links in the admin toolbar aren't built if so).

bbl_is_public_lang() and Babble_Languages:: is_public_lang() now accept a language object for the $lang_code parameter rather than throwing an exception.

Babble_Plugin:: setup() switches to a required parameter rather than throwing an exception.

get_transid() and set_transid() handle errors and cache checking more gracefully and return false (as they should) instead of throwing an exception.

simonwheatley commented 9 years ago

I'm still seeing two:

johnbillion commented 9 years ago

Fixed those two remaining exceptions.