EXCEPTION macro removed

fmt::throw_exception<> implemented
::narrow improved
Minor fixes
This commit is contained in:
Nekotekina 2016-08-08 19:01:06 +03:00
parent 46735d6b3d
commit a7e808b35b
198 changed files with 3025 additions and 2956 deletions

View file

@ -208,7 +208,7 @@ void audio_config::on_task()
}
else
{
throw EXCEPTION("Unknown channel count (port=%u, channel=%d)", port.number, port.channel);
fmt::throw_exception("Unknown channel count (port=%u, channel=%d)" HERE, port.number, port.channel);
}
memset(buf, 0, block_size * sizeof(float));
@ -461,7 +461,7 @@ s32 cellAudioGetPortConfig(u32 portNum, vm::ptr<CellAudioPortConfig> portConfig)
case audio_port_state::closed: portConfig->status = CELL_AUDIO_STATUS_CLOSE; break;
case audio_port_state::opened: portConfig->status = CELL_AUDIO_STATUS_READY; break;
case audio_port_state::started: portConfig->status = CELL_AUDIO_STATUS_RUN; break;
default: throw fmt::exception("Invalid port state (%d: %d)", portNum, (u32)state);
default: fmt::throw_exception("Invalid port state (%d: %d)", portNum, (u32)state);
}
portConfig->nChannel = port.channel;
@ -492,7 +492,7 @@ s32 cellAudioPortStart(u32 portNum)
case audio_port_state::closed: return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
case audio_port_state::started: return CELL_AUDIO_ERROR_PORT_ALREADY_RUN;
case audio_port_state::opened: return CELL_OK;
default: throw fmt::exception("Invalid port state (%d: %d)", portNum, (u32)state);
default: fmt::throw_exception("Invalid port state (%d: %d)", portNum, (u32)state);
}
}
@ -517,7 +517,7 @@ s32 cellAudioPortClose(u32 portNum)
case audio_port_state::closed: return CELL_AUDIO_ERROR_PORT_NOT_OPEN;
case audio_port_state::started: return CELL_OK;
case audio_port_state::opened: return CELL_OK;
default: throw fmt::exception("Invalid port state (%d: %d)", portNum, (u32)state);
default: fmt::throw_exception("Invalid port state (%d: %d)", portNum, (u32)state);
}
}
@ -542,7 +542,7 @@ s32 cellAudioPortStop(u32 portNum)
case audio_port_state::closed: return CELL_AUDIO_ERROR_PORT_NOT_RUN;
case audio_port_state::started: return CELL_OK;
case audio_port_state::opened: return CELL_AUDIO_ERROR_PORT_NOT_RUN;
default: throw fmt::exception("Invalid port state (%d: %d)", portNum, (u32)state);
default: fmt::throw_exception("Invalid port state (%d: %d)", portNum, (u32)state);
}
}