netizenorg / netnet.studio

netnet.studio is a hypermedia higherEd cyberspace for fully realizing the Web’s creative potential.
https://netnet.studio
GNU General Public License v3.0
30 stars 8 forks source link

netnet should warn about general errors #231

Open nbriz opened 1 year ago

nbriz commented 1 year ago

while netnet is being designed to try && catch common JS mistakes + warn users about them w/friendly error messages within the actual editor, i'm thinking that long term (when students start building on basic JS knowledge && start using JS libraries + APIs) it would be helpful if netnet actually introduced them to the actual Web Console.

maybe netnet can catch actual console errors:

window.addEventListener('error', (err) => {
  // do something with err object
})

and then create some sort of dialogue with the student, prompting them to open their Web Console and explaining how to use it. specifically explaining how to read error messages (ex. how to spot the line number, etc)

nbriz commented 1 year ago

might also want to use something like devtools-detect to avoid showing users the dialogue if the console is already open