Plugin Directory

Changeset 2692362


Ignore:
Timestamp:
03/11/2022 08:44:49 AM (4 years ago)
Author:
svgator
Message:

Error handling improvement

Location:
svgator
Files:
51 added
3 edited

Legend:

Unmodified
Added
Removed
  • svgator/trunk/admin/js/WP_SVGatorMenu.js

    r2555566 r2692362  
    244244                    });
    245245            }).catch(function(err) {
    246                 reject(err.msg.toString());
     246                let eMsg = 'Failed to connect to SVGator.';
     247                if (err) {
     248                    if (err.msg) {
     249                        if (typeof err.msg === 'string') {
     250                            eMsg = err.msg.toString();
     251                        } else {
     252                            try {
     253                                eMsg = JSON.stringify(err.msg);
     254                            } catch(e) {
     255                                if (err.msg.toString) {
     256                                    eMsg = err.msg.toString();
     257                                }
     258                            }
     259                        }
     260                    }
     261
     262                    if (err.code) {
     263                        eMsg += ' (' + err.code + ')';
     264                    }
     265                }
     266
     267                reject(eMsg);
    247268            });
    248269        });
  • svgator/trunk/readme.txt

    r2617013 r2692362  
    55Tags: svg, vector image
    66Requires at least: 5.0
    7 Tested up to: 5.7
    8 Stable tag: 1.2.2
     7Tested up to: 5.9.1
     8Stable tag: 1.2.3
    99
    1010The easiest way to add SVG animations to your website right from your SVGator account.
     
    7979== Changelog ==
    8080
     81= 1.2.3 =
     82* Error handling updated
     83
    8184= 1.2.2 =
    8285* SVGator SDK updated
  • svgator/trunk/svgator.php

    r2617013 r2692362  
    44 * Plugin URI: https://www.svgator.com/help/getting-started/how-to-add-svg-to-wordpress
    55 * Description: Import your animated SVGs from SVGator.com
    6  * Version: 1.2.2
     6 * Version: 1.2.3
    77 * Author: SVGator
    88 * Author URI: https://www.svgator.com
     
    3434}
    3535
    36 define('WP_SVGATOR_VERSION', '1.2.0');
     36define('WP_SVGATOR_VERSION', '1.2.3');
    3737define('WP_SVGATOR_PLUGIN_DIR', plugin_dir_path(__FILE__));
    3838define('WP_SVGATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.