Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8322705
sdk.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
sdk.js
View Options
import
{
getCurrentHub
}
from
'@sentry/hub'
;
import
{
logger
}
from
'@sentry/utils'
;
import
{
IS_DEBUG_BUILD
}
from
'./flags'
;
/**
* Internal function to create a new SDK client instance. The client is
* installed and then bound to the current scope.
*
* @param clientClass The client class to instantiate.
* @param options Options to pass to the client.
*/
export
function
initAndBind
(
clientClass
,
options
)
{
if
(
options
.
debug
===
true
)
{
if
(
IS_DEBUG_BUILD
)
{
logger
.
enable
();
}
else
{
// use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped
// eslint-disable-next-line no-console
console
.
warn
(
'[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.'
);
}
}
var
hub
=
getCurrentHub
();
var
scope
=
hub
.
getScope
();
if
(
scope
)
{
scope
.
update
(
options
.
initialScope
);
}
var
client
=
new
clientClass
(
options
);
hub
.
bindClient
(
client
);
}
//# sourceMappingURL=sdk.js.map
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Tue, Jun 3, 7:43 AM (3 d, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3355260
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment