Plugin Directory

Changeset 3175332


Ignore:
Timestamp:
10/24/2024 09:02:18 PM (17 months ago)
Author:
calj
Message:

1.4.3 better error handling

Location:
calj/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • calj/trunk/CalJPlugin.php

    r3175296 r3175332  
    137137        $key = self::getoptopt('api_key', '');
    138138        if (!$key) {
    139             return [];
     139            throw new \Exception('Missing API key.', 4);
    140140        }
    141141
     
    145145        $response = json_decode($response, true);
    146146        if ( (! $response) || (! isset($response['data'])) || (! $response['data']) ) {
    147             return null;
     147            throw new \Exception('API call returned no data.', 5);
    148148        }
    149149
    150150        $response = json_decode( self::xorString($response['data']), true );
    151151        if ( ! $response ) {
    152             return null;
     152            throw new \Exception('Failed to decrypt the response.', 6);
    153153        }
    154154
  • calj/trunk/calj.php

    r3175296 r3175332  
    66 * Plugin URI: https://calj.net
    77 * Description: Add the Shabbat times on your site.
    8  * Version: 1.4.2
     8 * Version: 1.4.3
    99 * Author: Gabriel Zerbib <gabriel@calj.net>
    1010 * Author URI: https://calj.net
Note: See TracChangeset for help on using the changeset viewer.