Giter Club home page Giter Club logo

Comments (8)

a2geek avatar a2geek commented on July 20, 2024 1

Closing out as PR #19 resolves.

from applecommander.

Lisias avatar Lisias commented on July 20, 2024

This is blocking a pet project of mine. I intend to pursue this matter.

How do you guys wants me to handle this? As a recursive loop is detected, what Exception (and what text) you want me to throw?

post edit

A similar problem also affects the ProDOS FormattedDisk implementation.

I have a working solution for this, currently under testing, implemented as follows:

PROPOSAL

  • infra code
    • DiskException
      • a new Root Exception for com.webcodepro.applecommander.storage.
      • DiskFullException extends it
      • a new DiskCorruptException extends it
      • Public interfaces throws it
        • code throws the Exception that closely describes the situation.
        • Client side can check the exception's subclass by hand on the few situations where it's needed.
    • public methods that throws IOException catches the DIskException and throw a new IOException with it.
    • public methods that don't throws anything, now throws DiskException
    • protected, private and default methods just throws DiskException, even if they throws IOException already.
  • UI
    • methods that throws IOException, catches DiskException and throw a new IOException with it.
    • methods than don't throw anything intercepts the DiskException and try to do something smart.
      • Some FIXME remarks are added where I think the user show be notified somehow.

Implemented result

013b - Congo Bongo.dsk
	File Name : /Users/lisias/code/net.lisias/net.lisias.retro/JAVA/data/a2/disks.bad/013b - Congo Bongo.dsk

com.webcodepro.applecommander.storage.DiskCorruptException: Recursive Directory structure detected.
	at com.webcodepro.applecommander.storage.os.dos33.DosFormatDisk.getFiles(DosFormatDisk.java:154)
	at examples.a2cmdr.test.show_disk(test.java:34)
	at examples.a2cmdr.test.main(test.java:19)

from applecommander.

a2geek avatar a2geek commented on July 20, 2024

That's awesome! Looking forward to this pull request, I like this initial approach. I've been busy and just wanted to let you know I appreciate the finding and the effort!

from applecommander.

Lisias avatar Lisias commented on July 20, 2024

On the "back end", things worked very well. I can parse all the asimov's disk images with success. The DiskException is being thrown when appropriated.

But the UI is kaput. I really messed up something (perhaps on my runtime environment, I didn't managed to find time to check what's happening yet) - no disk image's content is being rendered on the Panel. The thing doesn't blows up, but doesn't works correctly neither.

I had forked this repo and created a branch for this issue. Is someone is willing to give me a hand on the UI, you're welcome. :-)

Branch: https://github.com/Lisias/AppleCommander/tree/issues/18

from applecommander.

Lisias avatar Lisias commented on July 20, 2024

Holy Crud!!! I was trying to make a screenshot with the problem, and the thing suddenly works! :-)

It's my running environment for sure. Something just fixed itself on the last eclipse update. =D

I will spend some hours trying to break the thing to see what happens in the next few days. If everything goes fine, I'll do a push request. :-)

from applecommander.

Lisias avatar Lisias commented on July 20, 2024

Pull Request at

#19

from applecommander.

Lisias avatar Lisias commented on July 20, 2024

I updated the pull request, with the proposed fixes (including coding conventions) and some more tweaks to make further work easier to cope with. Also added UI support for the new warnings needed.

Please advise.

from applecommander.

Lisias avatar Lisias commented on July 20, 2024

About that First Aid tool. Should I open a issue for that to document the idea? It will be some time until I have the time to do that, but it would be nice to have it documented so I (or anyone else that like the job) can execute it without reverse-engineering the wheel. :-)

from applecommander.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.