Skip to content

Commit 1eaa980

Browse files
authored
Merge pull request #57 from oslabs-beta/danCrash
Improve the error handler to ignore the auto switch when failing from http2 to http1 remove error related to handleSingleEvent having undefined args modified webpack config to drop console logs in prod
2 parents 41b2f41 + f8aeb8a commit 1eaa980

File tree

20 files changed

+207
-20
lines changed

20 files changed

+207
-20
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ ehthumbs.db
5858

5959
# proto files #
6060
#####################
61-
*.proto
61+
src/client/components/composer/protos
62+
*.proto

main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ if (
118118
dev = true;
119119
}
120120

121+
121122
// Temporary fix broken high-dpi scale factor on Windows (125% scaling)
122123
// info: https://github.com/electron/electron/issues/9691
123124
if (process.platform === 'win32') {// if user is on windows...
@@ -269,6 +270,14 @@ autoUpdater.on('update-downloaded', info => {
269270
ipcMain.on('quit-and-install', () => {
270271
autoUpdater.quitAndInstall();
271272
});
273+
// App page reloads when user selects "Refresh" from pop-up dialog
274+
ipcMain.on('fatalError', () => {
275+
console.log('received fatal error')
276+
mainWindow.reload();
277+
});
278+
ipcMain.on('uncaughtException', () => {
279+
console.log('received uncaguht fatal error')
280+
});
272281

273282
app.on('activate', () => {
274283
// On macOS it's common to re-create a window in the app when the

src/client/components/composer/ComposerContainer.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ComposerContainer extends Component {
4040
// this.setState({
4141
// composerDisplay: this.props.composerDisplay,
4242
// });
43+
4344
}
4445

4546
componentDidUpdate() {//keeping the redux store state in sync with this component's local state

src/client/components/composer/NewRequest/GRPCProtoEntryForm.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
22
import { remote } from 'electron';
33
import fs from 'fs';
44
import GRPCAutoInputForm from "./GRPCAutoInputForm.jsx";
5-
import protoParserFunc from "../protos/protoParser.js";
5+
import protoParserFunc from "../../../../client/protoParser.js";
66
import dropDownArrow from '../../../../assets/icons/arrow_drop_down_white_192x192.png';
77

88
class GRPCProtoEntryForm extends Component {
@@ -18,7 +18,7 @@ class GRPCProtoEntryForm extends Component {
1818
this.submitUpdatedProto = this.submitUpdatedProto.bind(this);
1919
}
2020

21-
// event handler on the arrow button that allows you to open/close the section
21+
// event handler on the arrow button that allows you to open/close the section
2222
toggleShow() {
2323
this.setState({
2424
show: !this.state.show
@@ -113,7 +113,7 @@ class GRPCProtoEntryForm extends Component {
113113
// changes the button label from "Save Changes" to "Changes Saved"
114114
document.getElementById("save-proto").innerText = 'Changes Saved';
115115
}
116-
116+
117117
render() {
118118
// arrow button used to collapse or open the Proto section
119119
const arrowClass = this.state.show ? 'composer_subtitle_arrow-open' : 'composer_subtitle_arrow-closed';

src/client/components/composer/protos/1000.proto

Whitespace-only changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
syntax = "proto3";
2+
3+
package helloworld;
4+
5+
// The greeting service definition.
6+
service Greeter {
7+
// Sends a greeting
8+
rpc SayHello (HelloRequest) returns (HelloReply) {}
9+
rpc SayHelloCS (stream HelloRequest) returns (HelloReply) {}
10+
rpc SayHellos (HelloRequest) returns (stream HelloReply) {}
11+
rpc SayHelloBidi (stream HelloRequest) returns (stream HelloReply) {}
12+
}
13+
14+
// The request message containing the user's name.
15+
message HelloRequest {
16+
string name = 1;
17+
}
18+
19+
// The response message containing the greetings
20+
message HelloReply {
21+
string message = 1;
22+
}
23+
24+
// The request message containing the user's name.
25+
message HelloHowOldRequest {
26+
int32 age = 1;
27+
}
28+
message HelloAge {
29+
int32 age = 1;
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
syntax = "proto3";
2+
3+
package helloworld;
4+
5+
// The greeting service definition.
6+
service Greeter {
7+
// Sends a greeting
8+
rpc SayHello (HelloRequest) returns (HelloReply) {}
9+
rpc SayHelloCS (stream HelloRequest) returns (HelloReply) {}
10+
rpc SayHellos (HelloRequest) returns (stream HelloReply) {}
11+
rpc SayHelloBidi (stream HelloRequest) returns (stream HelloReply) {}
12+
}
13+
14+
// The request message containing the user's name.
15+
message HelloRequest {
16+
string name = 1;
17+
}
18+
19+
// The response message containing the greetings
20+
message HelloReply {
21+
string message = 1;
22+
}
23+
24+
// The request message containing the user's name.
25+
message HelloHowOldRequest {
26+
int32 age = 1;
27+
}
28+
message HelloAge {
29+
int32 age = 1;
30+
}

src/client/components/composer/protos/353.proto

Whitespace-only changes.

src/client/components/composer/protos/477.proto

Whitespace-only changes.

src/client/components/composer/protos/490.proto

Whitespace-only changes.

0 commit comments

Comments
 (0)