File tree 1 file changed +0
-21
lines changed
1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,6 @@ func main() {
111
111
os .Exit (0 )
112
112
}
113
113
114
- // function used to save panic to a file (WIP)
115
- defer panicToFile ()
116
-
117
114
// Launch main loop in a goroutine
118
115
go loop ()
119
116
@@ -151,24 +148,6 @@ func main() {
151
148
Systray .Start ()
152
149
}
153
150
154
- func panicToFile () {
155
- if r := recover (); r != nil {
156
- fileName := "crashreport_" + time .Now ().Format ("20060102150405" ) + ".txt"
157
- currDir , err := osext .ExecutableFolder ()
158
- if err != nil {
159
- panic (err )
160
- }
161
-
162
- crashreport := []byte ("stacktrace from panic: \n " + string (debug .Stack ()))
163
-
164
- err = ioutil .WriteFile (filepath .Join (currDir , fileName ), crashreport , 0644 )
165
- if err != nil {
166
- panic (err )
167
- }
168
- panic (r )
169
- }
170
- }
171
-
172
151
func copyExe (from , to string ) error {
173
152
data , err := ioutil .ReadFile (from )
174
153
if err != nil {
You can’t perform that action at this time.
0 commit comments