remove errors (#703)

This commit is contained in:
Kurt Hutten
2023-09-25 17:28:03 +10:00
committed by GitHub
parent a03d09b41d
commit c271942897
16 changed files with 12 additions and 26 deletions

View File

@ -216,7 +216,6 @@ export function App() {
} else if (interactionGuards.zoom.dragCallback(eWithButton)) { } else if (interactionGuards.zoom.dragCallback(eWithButton)) {
interaction = 'zoom' interaction = 'zoom'
} else { } else {
console.log('none')
return return
} }

View File

@ -64,10 +64,6 @@ export const Toolbar = () => {
})) }))
useAppMode() useAppMode()
useEffect(() => {
console.log('guiMode', guiMode)
}, [guiMode])
function ToolbarButtons({ className }: React.HTMLAttributes<HTMLElement>) { function ToolbarButtons({ className }: React.HTMLAttributes<HTMLElement>) {
return ( return (
<span className={styles.toolbarButtons + ' ' + className}> <span className={styles.toolbarButtons + ' ' + className}>

View File

@ -70,13 +70,12 @@ export const DebugPanel = ({ className, ...props }: CollapsiblePanelProps) => {
className="w-16" className="w-16"
type="checkbox" type="checkbox"
checked={sketchModeCmd.ortho} checked={sketchModeCmd.ortho}
onChange={(a) => { onChange={(a) =>
console.log(a, (a as any).checked)
setSketchModeCmd({ setSketchModeCmd({
...sketchModeCmd, ...sketchModeCmd,
ortho: a.target.checked, ortho: a.target.checked,
}) })
}} }
/> />
</div> </div>
<ActionButton <ActionButton

View File

@ -240,9 +240,6 @@ export const Stream = ({ className = '' }) => {
) { ) {
// Let's get the updated ast. // Let's get the updated ast.
if (sketchGroupId === '') return if (sketchGroupId === '') return
console.log('guiMode.pathId', guiMode.pathId)
// We have a problem if we do not have an id for the sketch group. // We have a problem if we do not have an id for the sketch group.
if ( if (
guiMode.pathId === undefined || guiMode.pathId === undefined ||

View File

@ -133,7 +133,7 @@ export const SetAbsDistance = ({ buttonType }: { buttonType: ButtonType }) => {
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap), callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
}) })
} catch (e) { } catch (e) {
console.log('e', e) console.log('error', e)
} }
}} }}
disabled={!enableAngLen} disabled={!enableAngLen}

View File

@ -147,7 +147,7 @@ export const SetAngleLength = ({
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap), callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
}) })
} catch (e) { } catch (e) {
console.log('e', e) console.log('erorr', e)
} }
}} }}
disabled={!enableAngLen} disabled={!enableAngLen}

View File

@ -109,7 +109,6 @@ export default class Client extends jsrpc.JSONRPCServerAndClient {
} }
} }
messageString += message messageString += message
// console.log(messageString)
return return
}) })

View File

@ -96,8 +96,6 @@ export class LanguageServerPlugin implements PluginValue {
async sendChange({ documentText }: { documentText: string }) { async sendChange({ documentText }: { documentText: string }) {
if (!this.client.ready) return if (!this.client.ready) return
console.log(documentText.length)
if (documentText.length > 5000) { if (documentText.length > 5000) {
// Clear out the text it thinks we have, large documents will throw a stack error. // Clear out the text it thinks we have, large documents will throw a stack error.
// This is obviously not a good fix but it works for now til we figure // This is obviously not a good fix but it works for now til we figure

View File

@ -178,8 +178,7 @@ export function useAppMode() {
}, },
}) })
) )
const res = await Promise.all(proms) await Promise.all(proms)
console.log('res', res)
setGuiMode({ setGuiMode({
mode: 'sketch', mode: 'sketch',
sketchMode: 'sketchEdit', sketchMode: 'sketchEdit',

View File

@ -48,7 +48,7 @@ export function useConvertToVariable() {
updateAst(_modifiedAst, true) updateAst(_modifiedAst, true)
} catch (e) { } catch (e) {
console.log('e', e) console.log('error', e)
} }
} }

View File

@ -1691,7 +1691,6 @@ describe('parsing errors', () => {
let _theError let _theError
try { try {
const result = expect(parser_wasm(code)) const result = expect(parser_wasm(code))
console.log('result', result)
} catch (e) { } catch (e) {
_theError = e _theError = e
} }

View File

@ -7,7 +7,7 @@ export const recast = (ast: Program): string => {
return s return s
} catch (e) { } catch (e) {
// TODO: do something real with the error. // TODO: do something real with the error.
console.log('recast', e) console.log('recast error', e)
throw e throw e
} }
} }

View File

@ -1279,7 +1279,7 @@ export function getTransformInfos(
}) as TransformInfo[] }) as TransformInfo[]
return theTransforms return theTransforms
} catch (error) { } catch (error) {
console.log(error) console.log('error', error)
return [] return []
} }
} }

View File

@ -11,7 +11,7 @@ export async function asyncLexer(str: string): Promise<Token[]> {
return tokens return tokens
} catch (e) { } catch (e) {
// TODO: do something real with the error. // TODO: do something real with the error.
console.log('lexer', e) console.log('lexer error', e)
throw e throw e
} }
} }
@ -22,7 +22,7 @@ export function lexer(str: string): Token[] {
return tokens return tokens
} catch (e) { } catch (e) {
// TODO: do something real with the error. // TODO: do something real with the error.
console.log('lexer', e) console.log('lexer error', e)
throw e throw e
} }
} }

View File

@ -39,6 +39,6 @@ export async function exportSave(data: ArrayBuffer) {
} }
} catch (e) { } catch (e) {
// TODO: do something real with the error. // TODO: do something real with the error.
console.log('export', e) console.log('export error', e)
} }
} }

View File

@ -36,7 +36,7 @@ export async function initializeProjectDirectory(directory: string) {
try { try {
docDirectory = await documentDir() docDirectory = await documentDir()
} catch (e) { } catch (e) {
console.log(e) console.log('error', e)
docDirectory = await homeDir() // seems to work better on Linux docDirectory = await homeDir() // seems to work better on Linux
} }