Ticket #2018 (closed bug: fixed)

Opened 16 years ago

Last modified 15 years ago

Opening invalid file evokes exception.

Reported by: todor Owned by: kyli
Priority: major Milestone: M12_RELEASE
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: todor Design_owners: kyli
Imp._owners: kyli Test_owners: vanya
Analysis_reviewers: kyli Changelog:
Design_reviewers: meddle Imp._reviewers: meddle
Test_reviewers: Analysis_score: 1
Design_score: 1 Imp._score: 1
Test_score: 0

Description

When trying to open file that doesn't exist sophie throws an exception instead of showing message that such file doesn't exist at the specific location.

Change History

comment:1 Changed 16 years ago by todor

  • Status changed from new to s1b_analysis_finished

comment:2 Changed 16 years ago by kyli

  • Design_owners set to kyli
  • Status changed from s1b_analysis_finished to s2a_design_started

comment:3 Changed 16 years ago by kyli

  • Status changed from s2a_design_started to s2b_design_finished

The problematic code is located at FileMenuLogic, ON_OPEN_BOOK. The code must throw exception (because of the invalid ref), but it must be handled. So, surround the creating of the ref and the opening of the book in a try/catch block, in the catch write DialogUtils.showExceptionDialog(null, e, "File not found"); The assertion which is thrown from ResourceRefR4.make(String) is better to be an exception, so change it with such and put a more user-friendly message.

comment:4 Changed 16 years ago by kyli

  • Status changed from s2b_design_finished to s2c_design_ok

comment:5 Changed 16 years ago by kyli

  • Owner set to kyli
  • Status changed from s2c_design_ok to s3a_implementation_started

comment:6 Changed 16 years ago by kyli

  • Status changed from s3a_implementation_started to s3b_implementation_finished

comment:7 Changed 16 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._owners set to kyli
  • Analysis_reviewers set to kyli
  • Analysis_score changed from 0 to 1
  • Cc kyli added
  • Imp._reviewers set to meddle
  • Design_score changed from 0 to 1
  • Design_reviewers set to meddle
  • Imp._score changed from 0 to 1

I don't like that you throw and catch RuntimeException, may be IllegalArgument is more proper one?
But as a whole just don't let the assertion error :)

Merged into the trunk at [6801].

I don't like this fix at all, so I decided to rewrite the solution...

1p (20m)

comment:8 Changed 16 years ago by kyli

  • Cc kyli removed

comment:9 Changed 16 years ago by vanya

  • Milestone set to M12_RELEASE

comment:10 Changed 15 years ago by vanya

  • Status changed from s3c_implementation_ok to closed
  • Test_owners set to vanya
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.