This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-04-12 06:08:07

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Squeak: see full error loading .sb file

I'm doing some more format hacking (kurt 2.0!), and I'm having some errors when reading a Scratch file that I've generated.

When I load the file in Scratch, I only get the message "Could not read project; file may be damaged". I'd like to see the full traceback. Is there any way to do that?

The bit I want to fix appears to be in "ScratchFrameMorph -> 'file read/write' -> openScratchProjectNamed:":

Code:

...
    [    projData _ f binary contentsOfEntireFile.
        newProj _ self extractProjectFrom: projData.
        projectInfo _ self extractInfoFrom: projData.
    ] ifError: [:err :rcvr | ^ self inform: 'Could not read project; file may be damaged' withDetails: '(', err, ')'].
...

But I can't remove that error (I just get a different one).

Any thoughts? Thanks!  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#2 2013-04-12 07:49:54

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Squeak: see full error loading .sb file

If you disable any custom error handlers and comment out ("") any try-catch blocks, it should show a debugger window when the error occurs.


nXIII

Offline

 

#3 2013-04-12 08:52:13

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Squeak: see full error loading .sb file

Hmm, I couldn't get it to.

I fixed the problem for now — but I'll ask again if I have the same problem!


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

Board footer