Wrapped provider::send()/provider::queue() with try/catch.

Error handling

Throw an exception if no gateway is set. This same exception is being implemented in https://github.com/dpi/smsframework/pull/37 when no gateway is found.

Log message to site log/use drupal_set_message if no gateway found. Tests for these failure states added.

API improvement

Improved API and testing for get/set default gateway on provider. Before this patch, getGateway is failing on gateway load because SmsGateway::load() cannot handle NULL.

Tests

Half of this patch is testing, and there is a refactoring of SmsFrameworkSettingsTest single test into multiple tests.

CommentFileSizeAuthor
#2 allow-invalid-fallback-2730641.patch12.82 KBdpi

Comments

dpi created an issue. See original summary.

dpi’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new12.82 KB

  • dpi committed 999f0bd on 8.x-1.x
    Issue #2730641 by dpi: Handle not set/incorrect default (fallback)...
dpi’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.