Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
8416c5d6
Commit
8416c5d6
authored
Apr 24, 2014
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add diagnostic message for missing *.kiface, which is now a fatal installation bug.
parent
32a9a4a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
kiway.cpp
common/kiway.cpp
+18
-0
kicad.cpp
kicad/kicad.cpp
+24
-0
No files found.
common/kiway.cpp
View file @
8416c5d6
...
@@ -183,6 +183,24 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )
...
@@ -183,6 +183,24 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )
// In any of the failure cases above, dso.Unload() should be called here
// In any of the failure cases above, dso.Unload() should be called here
// by dso destructor.
// by dso destructor.
// However:
// There is a file installation bug. We only look for KIFACE_I's which we know
// to exist, and we did not find one. If we do not find one, this is an
// installation bug.
wxString
msg
=
wxString
::
Format
(
wxT
(
"Fatal Installation Bug
\n
missing file:
\n
'%s'
\n\n
argv[0]:
\n
'%s'"
),
GetChars
(
dname
),
GetChars
(
wxStandardPaths
::
Get
().
GetExecutablePath
()
)
);
// This is a fatal error, one from which we cannot recover, nor do we want
// to protect against in client code which would require numerous noisy
// tests in numerous places. So we inform the user that the installation
// is bad. This exception will likely not get caught until way up in
// PGM_BASE or a derivative, at which point the process will exit gracefully.
THROW_IO_ERROR
(
msg
);
}
}
return
NULL
;
return
NULL
;
...
...
kicad/kicad.cpp
View file @
8416c5d6
...
@@ -280,6 +280,30 @@ struct APP_KICAD : public wxApp
...
@@ -280,6 +280,30 @@ struct APP_KICAD : public wxApp
return
wxApp
::
OnExit
();
return
wxApp
::
OnExit
();
}
}
int
OnRun
()
// overload wxApp virtual
{
try
{
return
wxApp
::
OnRun
();
}
catch
(
const
std
::
exception
&
e
)
{
wxLogError
(
wxT
(
"Unhandled exception class: %s what: %s"
),
GetChars
(
FROM_UTF8
(
typeid
(
e
).
name
()
)),
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);;
}
catch
(
const
IO_ERROR
&
ioe
)
{
wxLogError
(
GetChars
(
ioe
.
errorText
)
);
}
catch
(...)
{
wxLogError
(
wxT
(
"Unhandled exception of unknown type"
)
);
}
return
-
1
;
}
/**
/**
* Function MacOpenFile
* Function MacOpenFile
* is specific to MacOSX (not used under Linux or Windows).
* is specific to MacOSX (not used under Linux or Windows).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment