ref(utils): use web reportError helper (#3283)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/* @flow */
|
||||
|
||||
import { reportError } from '../util';
|
||||
|
||||
/**
|
||||
* Parses the query/search or fragment/hash parameters out of a specific URL and
|
||||
* returns them as a JS object.
|
||||
@@ -36,10 +38,8 @@ export default function parseURLParams(
|
||||
= JSON.parse(decodeURIComponent(value).replace(/\\&/, '&'));
|
||||
}
|
||||
} catch (e) {
|
||||
const msg = `Failed to parse URL parameter value: ${String(value)}`;
|
||||
|
||||
console.warn(msg, e);
|
||||
window.onerror && window.onerror(msg, null, null, null, e);
|
||||
reportError(
|
||||
e, `Failed to parse URL parameter value: ${String(value)}`);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user