mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 21:25:32 +00:00
feat(ext/web): add globalThis.reportError() (#13799)
This commit is contained in:
parent
a64e63c361
commit
c30d95f2e3
10 changed files with 93 additions and 17 deletions
|
@ -48,8 +48,9 @@ pub fn format_location(frame: &JsStackFrame) -> String {
|
|||
return cyan("native").to_string();
|
||||
}
|
||||
let mut result = String::new();
|
||||
if let Some(file_name) = &frame.file_name {
|
||||
result += &cyan(&format_file_name(file_name)).to_string();
|
||||
let file_name = frame.file_name.clone().unwrap_or_default();
|
||||
if !file_name.is_empty() {
|
||||
result += &cyan(&format_file_name(&file_name)).to_string();
|
||||
} else {
|
||||
if frame.is_eval {
|
||||
result +=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue