mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
[platform] launcher: making console attaching problems non-fatal
GitOrigin-RevId: b991b376565ec30a4dde14984c8c7044dd8af6b0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2a9d94c3e5
commit
6c5874feea
@@ -91,9 +91,11 @@ pub fn main_lib() {
|
||||
#[cfg(target_os = "windows")]
|
||||
fn attach_console() {
|
||||
unsafe {
|
||||
match AttachConsole(ATTACH_PARENT_PROCESS) {
|
||||
Ok(_) => {}
|
||||
Err(_) => AllocConsole().expect("Failed to attach to existing console or allocate a new one")
|
||||
if AttachConsole(ATTACH_PARENT_PROCESS).is_err() {
|
||||
eprintln!("AttachConsole(ATTACH_PARENT_PROCESS): {:?}", Foundation::GetLastError());
|
||||
if AllocConsole().is_err() {
|
||||
eprintln!("AllocConsole(): {:?}", Foundation::GetLastError());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user