Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error handling improvements #4198

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/remix-ide/src/app/files/fileManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ class FileManager extends Plugin {
}

async openFile(file?: string) {
if (!file) {
if (!file && file != '') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you really sure it's needed? or why did you need to do that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a case of empty line instead of the name while I was debugging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check if you still really need this? afaik if (!file) should do the same.

this.emit('noFileSelected')
this.events.emit('noFileSelected')
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export function ContractDropdownUI(props: ContractDropdownProps) {

let evmVersion = null
try {
evmVersion = JSON.parse(loadedContractData.metadata).settings.evmVersion
if (loadedContractData.metadata) evmVersion = JSON.parse(loadedContractData.metadata).settings.evmVersion
} catch (err) {}
return (
<div className="udapp_container mb-2" data-id="contractDropdownContainer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,13 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
}, []) // eslint-disable-line

const updateDirList = (path: string) => {
testTabLogic.dirList(path).then((options: string[]) => {
setPathOptions(options)
})
try {
testTabLogic.dirList(path).then((options: string[]) => {
setPathOptions(options)
})
} catch {
console.log("No test directory has been found in the workspace")
}
}

const handleTestDirInput = async (e: any) => {
Expand Down
Loading